develooper Front page | perl.perl6.language | Postings from November 2010

Re: exponentiation of Duration's

Thread Previous | Thread Next
From:
Carl Mäsak
Date:
November 17, 2010 05:56
Subject:
Re: exponentiation of Duration's
Message ID:
AANLkTimSYL=f9LjA1kjm=4WjuyjOWiLS27LCD55U9ShO@mail.gmail.com
Mark (>):
> I'm not convinced that the type system shouldn't be helping with
> dimensional analysis, but at least it shouldn't hurt.  By all means,
> let the programmer raise a Duration to a power - but the type of the
> result should not also be Duration.  In the absence of automatic
> dimension tracking, just return a plain number.

Or, by Ockham, since Duration is now deprived of its only task --
making life harder for the programmer -- remove it altogether from the
language and just put a number type in its place, representing number
of seconds.

// Carl

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About