Mark Lewis
1 min readOct 11, 2021

--

Now do a `map` from `string` to `int`. What do you have to do in Go for that? What about Scala? Prior to Go 2, the lack of generics in Go is a huge liability for code reuse. The inclusion of generics will inevitably make the language a lot less simple.

My personal observation is that any language whose key selling point is simplicity is in trouble. Languages tend to get more complex over time, especially the ones that start off simple, because programming involves certain complexity. Adding generics to languages has a great history in this regard, but it isn't alone.

The only way to potentially get around the constant growth in complexity is to be willing to make breaking changes. Most languages aren't willing to do that. Without it though, the number of ways to do things simply grows over time and the language gets more and more challenging to learn because none of the old ways that aren't recommended anymore are ever deprecated. I would argue that C++ and C# are great examples of this. JavaScript probably counts to. Everyone agrees that in JS you should now use `let` or `const` instead of `var`, but `var` still exists and you can't really learn JS without knowing what it is an how it works. Same thing goes for anonymous functions and lambdas in JS. I haven't looked to see if Go is going to take the route of breaking changes with Go 2.

--

--

Mark Lewis
Mark Lewis

Written by Mark Lewis

Computer Science Professor, Planetary Rings Simulator, Scala Zealot

Responses (1)