News for hackers. Stuff that matters.
Re:My Go Resolutions for 2017 by vorg on Wednesday January 18, 2017 @05:38PM (#13431062)
> it would be nice to retroactively define that string is a named type (or type alias) for immutable []byte

Perhaps an array is better than a slice, so `immutable [...]byte` Also, the for-range loop would have to behave differently so I guess it's a version 2 change. And if semantics are changing anyway, I'd prefer a `mutable` keyword to an `immutable` one.

Re:My Go Resolutions for 2017 by tomjakubowski on Thursday January 19, 2017 @01:16AM (#13433506)
> Perhaps an array is better than a slice, so `immutable [...]byte`

Slice is the right choice, I think. Were they to choose array as the alias, the language would need to "bubble up" the "array length" type parameter to the string type, which would make strings of different byte lengths incompatible types. But hey, Go is already pretty clearly inspired by Pascal, so maybe we'll see that after all :-)