Larry Wall wrote:
On Fri, Feb 20, 2009 at 03:31:03PM -0300, Daniel Ruoso wrote:
: Em Sex, 2009-02-20 às 10:17 -0800, Larry Wall escreveu:
: > By the by, I'm also inclined to agree with those who prefer "Instant"
: > to "DateTime" on aesthetic grounds.
Yay, I consider that a blessing.
Also yay on your war-pathing against integer fraction of seconds units, another
: I should note that I'm insisting on DateTime just as the reference p5
: module in CPAN, I don't oppose it being called Instant in Perl 6.
And I should clarify that by Instant I was referring to a particular
data type, not the module that defines it.
And I was meaning the same.
I suppose Temporal is as good a module name as any, though Temporal::Instant
does seem a bit redundant...
On the other hand, Instant::Duration is just wrong.
Well, yes. Instant means a point in time and Duration means an amount of time.
I think Instant and Duration should be the type/role names and Temporal should
be the name of the module declaring them.
Perhaps we could
just go with Instant and Duration as top-level roles since they're
rather fundamental to lots of computing.
Do you mean "top level" as in not existing under some declaring module, or as in
being imported into the main name-space by default?
As builtins they would
presumably come with appropriate operators predefined. And as roles
they could be tweaked by a derived class to mean something slightly
different, if the need arises.
Sounds good to me.
One remaining issue though (perhaps already resolved in an email I didn't read
yet) is whether these default builtins would be defined in terms of seconds
since an epoch or in terms of a calendar with YMDHIS (the seconds being a
non-integer) etc. I'm inclined to prefer the latter since that is more
future-proofed (a specified date+time that is in the future won't change on you
between storage and retrieval with persistent memory).
-- Darren Duncan