4 ms·
Maybe instead of adding generics to Go it's time to look into alternative programming languages which already implement generics, like for example Nim.
by dom96 11y ago
Maybe instead of adding generics to Go it's time to look into alternative programming languages which already implement generics, like for example Nim.
- idobai 11y agoYou forgot that most of golangers are ex-php programmers and students with no experience. Just look at what they're talking about: they think generics are the opposite of simplicity and can make performance and compilation time worse. Meanwhile, Nim has generics with other useful features and has faster compilation time along with better optimization. If google would put 'goto' into go golangers would still use it anyway. I've tried go a few times and it was full with repetition and boilerplate - felt like java 1.0. It seems like new coders like to repeat themselves more often than learn how to use proven concepts.
- Rooki 11y agoGo does have 'goto'. https://golang.org/ref/spec#Goto_statements https://golang.org/ref/spec#Goto_statements
- treehau5 11y ago> You forgot that most of golangers are ex-php programmers and students with no experience. How hopelessly smug and incorrect.
- idobai 11y agoJust look at the "conversion" blogs, most of the writers are php and python devs. And if you look closer you'll see that most of these bloggers are around 20 and they don't tolerate such complex things like generics...
- serge2k 11y agoIt's a conversation about go, isn't being smug and/or incorrect fundamental to participating?
- ngrilly 11y agoMaybe Go does things Nim doesn't.
- idobai 11y agoWhat things? Care to elaborate?
- sangnoir 11y agointerfaces
- idobai 11y agoLook at Nim's concept(http://nim-lang.org/docs/manual.html#generics-concepts http://nim-lang.org/docs/manual.html#generics-concepts), it can do more than a regular interface. Edit: here is how they look like, concept vs interface: 1. Nim: http://ideone.com/wn3Kzf http://ideone.com/wn3Kzf 2. Go: http://ideone.com/fRrB05 http://ideone.com/fRrB05
- spriggan3 11y agoNim has generics but doesn't have interfaces, which makes things even worse in my opinion.
- dom96 11y agoTrue. But Nim does have type classes, which in some ways are much better. Interfaces like the ones in Go can be easily emulated using closures.