> -----Original Message-----
> From: Kevin O'Neill [mailto:kevin@;rocketred.com.au]
> Sent: November 11, 2002 5:47 PM
> To: FOP Developers
> Subject: Re: A performance patch for PDFInfo class
>
[ SNIP ]
> String buffers are used by the compiler to implement the binary string
> concatenation operator +. For example, the code:
>
>      x = "a" + 4 + "c"
>
>
> is compiled to the equivalent of:
>
>      x = new StringBuffer().append("a").append(4).append("c")
>                            .toString()
>
>
> So the first recommendation is to use String "+" for this type of
> method, it's easier to read and runs faster.
[ SNIP ]

This kind of thing is discussed by Jack Shirazi at length, also.

The thing is, there has long been a blanket instruction, don't use String
concatenation. Programmers learn it by fiat, and never think it through. In
fact, it should be obvious to any programmer (if they are encouraged to
think, that is) that concatenation of literal Strings is not something to
avoid. Assuming a decent compiler.

Regards,
AHS


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to