PROPOSAL: Simplified StringBuffer/StringBuilder syntax

Mark Thornton mthornton at optrak.co.uk
Tue Mar 31 06:09:27 PDT 2009


Reinier Zwitserloot wrote:
> + being overloaded to also mean string concatenation was a mistake in 
> java 1.0*. Let's not enshrine it by making more of them.
>
> Also, if '+' will call .append on any appendables, I guarantee you, 
> the first thing some clown will create is this:
>
> public class BigInteger2 extends Number implements Appendable {
>    //I'm a BigInteger that supports +! Oh - and I'm mutable too :/
> }
>
and most people who see it will immediately tell him that he is a clown. 
So I think peer pressure will ensure that we see very little of this use.

I agree that using + for string concatenation was unfortunate, but we 
can't change it now.

Mark




More information about the coin-dev mailing list