masak (>>), Kris (>):
>> <masonkramer> "Durations allow additive operations with other
>> durations, _and allow any numeric operation with a number as the other
>> argument_"
>
> I don't think enough context was quoted (or paid atttention to)
>
> The next line in the spec is:
>
>     $duration * $duration    # WRONG, durations aren't geometric
>
> which would seem to apply to exponentiation as well.

Taken literally, the spec allows "any numeric operation with a number
as the other argument". C<$duration ** 2> certainly qualifies as just
that. I sympathise with your extrapolation from multiplication, but it
seems to me that the explicit rule takes precedence.

Of course, the fundamental issue is whether restrictions of this kind
are actually helpful. My contention is that they're not.

Here's an article that moritz++ wrote about it:
http://perlgeek.de/blog-en/perl-6/real-world-strikes-back.html

I agree with moritz' conclusion, that Duration should simply go away.
It doesn't add any obvious advantage over the number of seconds stored
in a Num or Rat.

Reply via email to