3 ms·
Better enums and non-nil types, that would be my wish list for Go. And conditional expressions, if there's one more wish to be granted. There's no need to make
by tgv 4y ago
Better enums and non-nil types, that would be my wish list for Go. And conditional expressions, if there's one more wish to be granted. There's no need to make it resemble Rust: Go's type system is expressive enough as it is.
> has error prone C-style 'for'
Not really true. It has `for index, elt := range v` to iterate over arrays and maps. It's a pity you can't define your own range, that's true.
- eliasdaler 4y agoCustom ranges will be possible at some point: https://github.com/golang/go/discussions/54245 https://github.com/golang/go/discussions/54245