I still have uses for Durations.  

For instance, I want to dispatch a different .Stringy method to Durations than 
to Nums.  It's convenient to me that the difference between two Instants has a 
different type than the difference between 1654321681.123 and 1654321021.65438.

I just think Durations should be Liskov substitutable for Rats.  I don't give 
any credence at all to the school of thought that the language designer can 
think of every legitimate mathematical operation for the difference between two 
instants.  But I still want to use the type system to do MMD.

Cheers,

Mason

On Nov 17, 2010, at  08:56 AM, Carl Mäsak wrote:

> 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

Reply via email to