News for hackers. Stuff that matters.
Re:Go 1.9 Beta 1 release notes by hardwaresofton on Thursday June 15, 2017 @02:21AM (#14558295)
Thanks for the clarification! You're absolutely right -- Go's regular types would have actually helped with that.

I don't know that I would build the same kind of type machinery though (I might only use the alias, not the actual type), since a call like

  isBoiling(212)
would fall apart.

In particular, I think the type aliasing will make function signatures a lot clearer -- if I to write a `Celsius` type class, I would likely just make a small, hopefully simple `Temperature` type. Unfortunately last time I wrote any Go code, I wasn't anywhere near that careful/purposeful with the types (I mostly left things as `int`s, etc)

Re:Go 1.9 Beta 1 release notes by ithkuil on Thursday June 15, 2017 @03:22PM (#14563564)
Go constants are untyped, which means you can pass a number as argument to a function that takes a type whose underlying type is an integer (e.g. time.Duration) without having to explicitly mention the type. That's how time.Sleep(5 * time.Minute) works