3 ms·
So basically Scala and Haskell? I've tried Go but was turned off by the complexity of writing a sort function - an artifact of static typing. Seems to me you'll
by facepalm 11y ago
So basically Scala and Haskell? I've tried Go but was turned off by the complexity of writing a sort function - an artifact of static typing. Seems to me you'll always end up with something like generics which becomes complicated quickly?
- brianwawok 11y agoI mean every language has a baked in sort function, so maybe that is a bad place to start :) Java collection signatures are not super complex but they have fundamental bugs fixed in the slightly more complex scala collections type signatures.
- facepalm 11y agoNo I mean using the sort framework of Go. It takes several steps to set up a comparator function. compared to list.sort(function(a,b){return comparisonResult}) that was very demotivating to me.
- ldrndll 11y agoIt seems like quite a few people have found that the simplicity of Go's type system just winds up transferring the complexity to your code base, instead of in the language implementation. I find it interesting how divided the opinions are on this.
- sagichmal 11y agoThere's no complexity involved in implementing the sort.Sort interface in Go. Some typing, but certainly no complexity.