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.

On Wednesday, November 17, 2010, Moritz Lenz <mor...@faui2k3.org> wrote:
> Am 17.11.2010 14:02, schrieb Oha:
>
> On 11/17/2010 01:46 PM, Moritz Lenz wrote:
>
> Just as a data point, in physics duration squared does exist.
>
> On the other hand, i can see why an Instant can't be used as a linear
> value: it does not have a clear origin (or zero value).
>
>
> That's correct, and the reason that nobody argued for changing Instant so far.
>
>
> Therefore the multiplication of two Instant may results in different
> results based on where you place the zero, unless you first convert
> the Instant in a Duration (e.g. seconds since 1 jan 1970)
>
>
> Right. And therefore having to do the conversion explicitly is a good thing 
> -- you immediately see which epoch was used.
>
> Cheers,
> Moritz
>

-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to