println-Bug in Java

Per Bothner per@bothner.com
Wed Mar 16 17:44:00 GMT 2005


David Daney wrote:
> Bojan Antonovic wrote:
>>> ... So for me this is a bug in the Java 
>> Language Specification, because it leads to misbehaviour.
>>>> For me, this thing is cleared, and I don't want to polute 
>> java@gcc.gnu.org with discussions about facts they can't change! :)
>>> Per is correct, you are mistaken.

You missed this part of Bojan's message. I don't necessarily agree
that the definition of '+' "leads to misbehavior" but I don't think
it's a good design choice. '++' might have been less confusing if a
trifle more verbose, though with Java-5's varargs theer is less
need for String concatenation.
For example, Java's '+' isn't associative or commutative. (Floating-point
'+' isn't associative either, but it's at least "approximately" asociative.)
-- 
	--Per Bothner
per@bothner.com http://per.bothner.com/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /