[using my gmail account because for some reason I'm not seeing my
mails go through to the list...]
Okay, I've been meaning to do this for a while, but now I've just
about had enough (plus, now I have some free time). As Sam Vilain
wronte in a separete thread:
> I have found DateTime unsuitable to quite a few tasks for
> various unfortunate reasons; which is a shame given the level of
> following and amount of design time that's gone into it.
And I quite agree. It's a shame if we don't fix this and make
DateTime.pm useful in any project -- and damnit I want to see it
survive in Perl6.
So without anymore adew, here's my braindump of things that needs
reviewing, and possible solutions:
Break Down of DateTime.pm:
DateTime.pm
- Accessors/Mutators
- Formatters (ymd, mdy, stringify, etc)
- Calculations (day_of_week, week, internal calculations, etc)
- Date math (+DateTime::Duration)
DateTime-TimeZone
DateTime-Locale
DateTime-Duration
DateTime.pm
- Prioritize features in DateTime.pm, and figure out the
most effective area to improve
- Use XS, where feasible. Move more existing PurePerl stuff
in *PP.pm modules
Locale / TimeZone
Given...
- Locale and TimeZones are singletons
- They are not *that* often used
Possible Improvements:
- Defer loading them until absolutely necessary
- Do not keep copy of a these objects in memory,
and keep the ID only
- (collary: keep necessary flags like "is_floating"
in memory as part of DateTime's blessed hash)
Also implement in XS?
If you guys have any suggestions, critiques, or anything else, please
let the list know. For one, I'm going to see where I can just go ahead
and switch to XS and send a patch...
Let's make this excellent framework leaner and meaner!
--d