Am 19.11.2010 05:45, schrieb Jon Lang:
On Thu, Nov 18, 2010 at 8:25 PM, Carl Mäsak<cma...@gmail.com> wrote:
Here's my proposal for how to handle dimensionality in Perl 6:
The idea has come up before, everyone thinks that Perl 6 and unit
handling are a good fit for each other, and we're basically waiting
for someone to write such a module. Incidentally, your phrase "a
complication that we needn't deal with up front" is exactly why
there's no pressing need to put this in Perl 6 "core" (fsvo "core").
I'm suggesting this because the recent thread about Duration indicates
to me that there _is_ a need to put at least a minimally-featured unit
handling system into the core,
That's not what I learned from that discussion.
My conclusions from the discussions about Durations where that
* the old attempt to forbid some operations as part of dimensionality
analysis were a bad idea
* if there should be a dimensionality type system in Perl 6, it must be
more powerful than simply forbidding some operations that do make sense
Nowhere have I seen the need for a unit handling system in core.
Just because we happen to know the units/dimensions of a single type
(Duration) doesn't mean we have to ship a system that can enforce
correct dimension handling. I've read that some people like that idea,
but I've seen no *need*.
Iff somebody comes up with a nice, small unit handling system (*), and
can demonstrate how well it can integrate with Durations and the rest of
the type system, I (and the other sceptics) might reconsider my objection.
(*) runnable code please.