News for hackers. Stuff that matters.
Re:Go 1.18 Beta 1 is available, with generics by lucian1900 on Wednesday December 15, 2021 @09:48AM (#29566638)
Go switches with exhaustion checks like in [1] would go a long way. An early return construct would be important as well, though, you're right.

Go's for loops can only iterate over builtin types: slices, maps, channels, etc. You can't produce a custom type that is to be iterated over.

1. https://github.com/BurntSushi/go-sumtype

There are no comments on this comment yet.