On Fri, 20 Feb 2009, Leon Timmermans wrote:
On Thu, Feb 19, 2009 at 7:26 PM, Dave Rolsky <auta...@urth.org> wrote:
After some discussion I made a number of drastic revisions to
S32-setting-library/Temporal.pod
What I want to see in Perl 6 is a set of very minimal roles that can be used
to provide a simply object from gmtime() and localtime(). These objects
should not handle locales, proper Olson timezones, string parsing,
user-defined formatting, or math.
They're basically simply little data blobs with some overloading and a few
handy methods.
I imagine that a real classes which do math, handle leap seconds,
formatting, and so on will _also_ do these roles, but this should be done
out of core.
I don't really know Perl 6 all that well, so I'd welcome review, in
particular of my Perl 6-isms, and also just of the general concepts.
Why should an Instant be a role, and not a concrete class? What would
one instant do that another can't? Representing a specific moment in
time sounds like a very concrete thing to me.
Presumably the core would also ship with a class that does the
Temporal::DateTime role.
However, it'd also be nice for things on CPAN6 to be able to satisfy an
API that codes against these roles. I think that letting things in the
core be replaceable is a good design.
-dave
/*============================================================
http://VegGuide.org http://blog.urth.org
Your guide to all that's veg House Absolute(ly Pointless)
============================================================*/