I guess it depends on how you'd like to represent a date and time.
We may have 2 representations here, the DateAndTime object and the string.
If you consider that the string '1901-01-01T00:00:00+12:00' actually *
represents* that day and time and it's not just the way you would print it,
then I think it's valid to compare one representation and another of the
same concept, because they really *mean* the same to you.

If you see '1901-01-01T00:00:00+12:00' and say "that's not a date and time,
it's just how I'd print it" maybe the only valid representation of the date
and time for you is a DateAndTime object, then it doesn't make sense
comparing de DateAndTime object with it's string.

Personally, I think the string it's just the "print string", I agree with
you. But maybe originally the people who implemented that comparison
considered it as a date and time representation too, so it makes sense to
compare them.



On Wed, Mar 17, 2010 at 10:22 AM, Stéphane Ducasse <
[email protected]> wrote:

> >
> > I would expect = to be
> > "reflexive"       self assert: (a = a).
> > "symmetric"   self assert: (a = b) ==> (b = a).
> > "transitive"      self assert: (a = b) & (b = c) ==> (a = c).
> >
> > Date>>= does not seem to meet my expectations
>
> Yes the more I think about it the more I'm against this automatic
> conversion.
>
> Stef
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to