harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magnusson, Geir" <geir.magnus...@intel.com>
Subject RE: Re: [classlib] compatibility of toString
Date Fri, 07 Jul 2006 17:29:12 GMT

> -----Original Message-----
> From: Alex Blewitt [mailto:alex.blewitt@gmail.com] 
> Sent: Friday, July 07, 2006 11:52 AM
> To: harmony-dev@incubator.apache.org; geir@pobox.com
> Subject: Re: Re: [classlib] compatibility of toString
> 
> On 06/07/06, Geir Magnusson Jr <geir@pobox.com> 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).

No kidding.  Welcome to the real world :)  People do all sorts of stupid
things.

> 
> 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).

Because :

1) We are asking Sun about this, so it's clear we're bringing it up as
an issue to them.

2) We try to get it from the RI via black-box, and if we can't, we can't
and use our best judgement.

> 
> 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.

So if we are satisfied that it doesn't put us at risk from
defense-of-cleanroom perspective, do you still have a problem if we at
least try?

Geir

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message