Type safety and time units in Go and D

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 20 05:24:34 PST 2015


On 1/20/15 5:44 AM, Atila Neves wrote:
> My buddy Jeff never learns... he sent me a blog post link about Go
> development today and I ended up comparing how the bug mentioned in the
> blog post wouldn't happen in D:
>
> https://atilanevesoncode.wordpress.com/2015/01/20/type-safety-and-time-intervals-in-d-and-go/

On the question of why that is the way it is, it's because we actually 
thought of all that shit when designing the time library :) I was a big 
proponent of not using the same type to mean duration and timestamp, and 
only allowing sane operations. Jonathan was the same way.

You can see some if it here:

http://forum.dlang.org/thread/340452.74950.qm@web58008.mail.re3.yahoo.com
http://forum.dlang.org/thread/201008141800.31122.jmdavisProg@gmail.com
http://forum.dlang.org/thread/201010081404.59147.jmdavisProg@gmx.com


Ah, the nostalgia :)

-Steve



More information about the Digitalmars-d mailing list