On Tuesday 15 November 2005 6:52 am, Daniel Schierbeck wrote:

> > I *wish* Time and DateTime worked more like Fixnum and Bignum.
> >
> > Chris
>
> What kind of change would you suggest?

The analagous behavior would be for every Time method that could have a date 
out of range check its inputs, and if that is going to occur, it switched 
over to DateTime.  However, within the library, that poses some issues.

First, it means lots of value checks on many methods, which is additional 
overhead.  It also means that in order for this to be relatively transparent, 
implementations of a plethora of Time methods, like gm and local and others, 
for DateTime.  Then, though, does one take the mountain of methods unique to 
Date/DateTime and make versions of them in Time?  It seems like an awful lot 
of code and overhead added to the system libraries for something that's 
pretty easy to detect and handle oneself in cases where it is needed, IMHO.

The internal and external aspects of the two classes are so different that I 
think it's dangerous to have any built-in casting from one to the other in 
the standard library.

I think that there should be some convenience methods, as we have discussed, 
to go to and from the three classes (Date, DateTime, and Time), though.  One 
should not have to reinvent that wheel.


Kirk Haines