On 06/07/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:

Alex Blewitt wrote:
> IMNSHO I don't think we should by default copy the toString()
> behaviour from the RI, unless mandated by the spec in JavaDoc.

Ok.  Good rant, and I agree with it, but I still don't see a reason here
why we shouldn't, other than to .... teach people a lesson?

If people are relying on one implementation that's undocumented
behaviour, then it's bad code. It may well fail on any other system
(inc. embedded systems, or other OS, or even between different
versions).

But the real reason is one of defense; how can you say that you've
implemented a clean-room version of the code from the spec, when all
the toString() results are identical with a proprietary implementation
that you have no way of knowing what the result should be, except by
running the propetary version to find out? Obviously, some cases it
will be obvious (e.g. we can guess what a java.net.URL looks like) but
in most cases it won't be (e.g. java.net.URLConnection).

I say that we follow the spec, and if the spec doesn't list an
explicit format, we use our own. If it is amazingly obvious (e.g. a
Point may be printed (1,2)) and it happens to correspond with the Sun
RI, then great, but we shouldn't be striving to be the same in all
cases.

Alex.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to