▲ | morsecodist 3 days ago | ||||||||||||||||||||||||||||||||||
I find the way people talk about Go super weird. If people have criticisms people almost always respond that the language is just "fine" and people kind of shame you for wanting it. People say Go is simpler but having to write a for loop to get the list of keys of a map is not simpler. | |||||||||||||||||||||||||||||||||||
▲ | TheDong 3 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
I agree with your point, but you'll have to update your example of something go can't do > having to write a for loop to get the list of keys of a map We now have the stdlib "maps" package, you can do:
With the wonder of generics, it's finally possible to implement that.Now if only Go was consistent about methods vs functions, maybe then we could have "keys := someMap.Keys()" instead of it being a weird mix like `http.Request.Headers.Set("key", "value")` but `map["key"] = "value"` Or 'close(chan x)' but 'file.Close()', etc etc. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | nixosbestos 3 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
Ooh! Or remember when a bunch of people acted like they had ascended to heaven for looking down on syntax-highlighting because Rob said something about it being a distraction? Or the swarms blasting me for insisting GOPATH was a nightmare that could only be born of Google's hubris (literally at the same time that `godep` was a thing and Kubernetes was spending significant efforts just fucking dealing with GOPATH.). Happy to not be in that community, happy to not have to write (or read) Go these days. And frankly, most of the time I see people gushing about Go, it's for features that trivially exist in most languages that aren't C, or are entirely subjective like "it's easy" (while ignoring, you know, reality). |