5 ms·
Which static language should supposedly have won?
by facepalm 11y ago
Which static language should supposedly have won?
- creshal 11y agoApparently the emergence of Go, Rust et al. is a sign that static typing has "won". I'd more argue it's a sign that C and its derivatives are ripe to be replaced.
- sagichmal 11y ago> Which static language should supposedly have won? It's absolutely not that specific static languages have "won". But rather that the latest crop of static languages have proved that the oft-cited downsides of static typing, e.g. type stuttering in declarations, can be pragmatically addressed by other means, e.g. type inference. As such, the cost differential of static languages over dynamic is reduced to near-zero, and all of the benefits remain. I don't really see an argument, or really counter-argument, in the linked post. The author complains that the current crop of dynamic languages are badly implemented, but I'm not sure that holds water when you look at e.g. Clojure. They claim the chief advantage of static languages is IDE support/integration, but that seems like a strawman to me, a fringe benefit of the real, structural advantages of an explicit type layer.
- creshal 11y ago> But rather that the latest crop of static languages have proved that the oft-cited downsides of static typing, e.g. type stuttering in declarations, can be pragmatically addressed by other means, e.g. type inference. Meanwhile, dynamic languages like Python are adding type hints, to give many of the benefits of static typing while retaining full dynamic semantics. The lines are getting blurry. IMO a good sign.
- facepalm 11y agoSo 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.