4 ms·
That's language-specific advice. Go handles this much more elegantly. You can create a Celsius type very simply: type Celsius float64 // Temperature in degrees
by skybrian 14y ago
That's language-specific advice. Go handles this much more elegantly. You can create a Celsius type very simply:
type Celsius float64 // Temperature in degrees Celsius
It's no harder to use than 'typedef' in C and similarly it doesn't get in your way, but you get a real type and nice errors when you screw up. There's no reason not to do it right away.