4 ms·
I'm really mixed about this. As a developer I would love having generics in Go. I can think of a few places in my code I can greatly simplify if they were imple
by ed25519FUUU 6y ago
I'm really mixed about this. As a developer I would love having generics in Go. I can think of a few places in my code I can greatly simplify if they were implemented now.
However, as someone who reads other people's Go code, I'm not a huge fan. One of the greatest things about Go is that a developer can usually one-shot read and understand almost anybody's code because there's a simplicity "forcing-function" applied to everything. To lose that would be a shame.
- __jem 6y agoIn other words, go is the language you want your coworkers to write, not the language you want to write. :)
- ed25519FUUU 6y agoI agree totally with this sentiment. I love reading other people's Go code but not always writing it, which is basically the opposite of virtually every other programming language I've used.
- erik_seaberg 6y agoI’m reminded of “languages designed for the masses”: https://news.ycombinator.com/item?id=899246 https://news.ycombinator.com/item?id=899246
- whateveracct 6y agoparametric polymorphism does not make code harder to read you know what's hard to read? hand-rolled for loops & select blocks combined to wrangle concurrency. the no1 benefit of parametric polymorphism in Go is going to be abstracting over concurrency
- JamesSwift 6y agoExactly. I found myself so frustrated when learning Go and digging into the "gotchas" of goroutines. There is so much non-obvious complexity that could be completely avoided by providing generics so that someone else can develop a package to handle the issues for you.