Re: Standard library - date and time
- Posted by Jeremy Cowgar <jeremy at c?w?ar.com> Apr 22, 2008
- 1078 views
c.k.lester wrote: > > > I strongly vote for only one type: datetime. > > Is this for in a lib or in the interpreter? > > A date sequence will be { year:any integer value, month:integer 1-12, > day:integer 1-28|29|30|31 depending on month } > > I don't think types are necessary. Would it allow for some optimizations? It would allow for clearer code and better error checking, for instance:
sequence a a = {} add_days(a, 100)
That would fail w/meaningful information. I do not think it does anything for optimization, if anything, it would slow things down due to type checking? Do I understand that correctly? However, in your production code you can add without type_check. Input? P.S. Maybe we should get on irc.freenode.org#euphoria! We are using the EUforum for instant(like) chat! -- Jeremy Cowgar http://jeremy.cowgar.com