guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SRFI-13 again [was: Re: string vs list processing]


From: Martin Grabmueller
Subject: Re: SRFI-13 again [was: Re: string vs list processing]
Date: Fri, 20 Apr 2001 01:21:10 +0200

> From: Per Bothner <address@hidden>
> Date: 19 Apr 2001 16:13:03 -0700
> 
> Martin Grabmueller <address@hidden> writes:
> 
> > It's just that people are used to say things like ...
> > foo + "bar"
> > in Java (which is a no--no, btw, use StringBuffer instead).
> 
> Er, you *are* using a StringBuffer if you do foo + "bar", which is
> normally implemented as syntactic sugar for StringBuffer method calls.

Seems I am on thin ice here, but anyway (correct me if I am wrong)...

What I meant was using a StringBuffer for concatenating long lists of
strings, which is normally done in a loop.  I don't think any Java
compiler is smart enough to figure out that he could use only _one_
StringBuffer for something like this:

s = "";
for (i = 0; i < strings.length; i++)
  s = s + strings[i];

Regards,
  'martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]