3 ms·
This is valid, just not for Go. There isn't some big underlying coherence guiding the design; it's more a bunch of one-offs. For example, you get a nice operat
by millstone 11y ago
This is valid, just not for Go. There isn't some big underlying coherence guiding the design; it's more a bunch of one-offs.
For example, you get a nice operator for appending to a string, but not a slice. A zero-valued slice is empty, a zero-valued map is nil.
This isn't to say that Go is bad, it's just that its tradeoffs aren't in service of any big unifying vision. When range can only iterate over a slice, map, string, or channel, there's no forest. It's just four trees.
- sagichmal 11y agoThe tradeoffs absolutely are in service of a big, unifying vision. That is, software development in the large. There are plenty of talks by Andrew, Rob, etc. that describe this calculus in detail. Whether or not they're convincing to you personally is, I guess, another matter.