|
|
|
|
|
by millstone
3746 days 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. |
|