Revolutionary technology right here lads. This is what happens when you ignore the entire history of programming languages and all the lessons learned along the way. You end up with a proposal to add type parameters, 8 or so years after its release.
Java took 8 or so years to add generics to its language, what's your point?
They explicitly did NOT ignore the history of programming languages, and resisted the urge of adding generics without fully understanding the problem that it was trying to solve (in the context of Go). See also: https://golang.org/doc/faq#generics
There's a trend going on in the past decade or so where every language goes to adopt features from other languages, adding complexity without actually solving a problem other than "I use this feature in language X, why doesn't YOUR language have it?"
Which lead to pretty shitty decisions, like half implementations of OOP in PHP and Javascript (have some classes, but not access modifiers), functional programming in Java, or every paradigm ever invented all at the same time in Scala.
> They explicitly did NOT ignore the history of programming languages, and resisted the urge of adding generics without fully understanding the problem that it was trying to solve (in the context of Go). See also: https://golang.org/doc/faq#generics
That's simply not true. Languages like StandardML, Ocaml, or Haskell have already solved the major issues 40 years ago with types vastly superior to what go offers. Since then, nothing has come even close to that level of utility and usability.
Like so many other things in go, it seems a combination of Hubris and NIH syndrome.
The problem is that languages are difficult to change later. Once your language is designed, it becomes hard to change it. You can see that with Java that has half baked generics, horrible primitive types, strange collections, null and so on.
I believe, that for new languages there are only two choices:
1. Build a simple language and don't implement generics _forever_. That is fine! Just stick with it.
2. Build generics into the language from the beginning and do it right. If that's too hard for you, then don't create a language in the beginning. Creating programming languages is damn hard. Amateurs will just fail.
Cthulhu_|5 years ago
They explicitly did NOT ignore the history of programming languages, and resisted the urge of adding generics without fully understanding the problem that it was trying to solve (in the context of Go). See also: https://golang.org/doc/faq#generics
There's a trend going on in the past decade or so where every language goes to adopt features from other languages, adding complexity without actually solving a problem other than "I use this feature in language X, why doesn't YOUR language have it?"
Which lead to pretty shitty decisions, like half implementations of OOP in PHP and Javascript (have some classes, but not access modifiers), functional programming in Java, or every paradigm ever invented all at the same time in Scala.
hajile|5 years ago
That's simply not true. Languages like StandardML, Ocaml, or Haskell have already solved the major issues 40 years ago with types vastly superior to what go offers. Since then, nothing has come even close to that level of utility and usability.
Like so many other things in go, it seems a combination of Hubris and NIH syndrome.
valenterry|5 years ago
I believe, that for new languages there are only two choices:
1. Build a simple language and don't implement generics _forever_. That is fine! Just stick with it.
2. Build generics into the language from the beginning and do it right. If that's too hard for you, then don't create a language in the beginning. Creating programming languages is damn hard. Amateurs will just fail.
valenterry|5 years ago
ghthor|5 years ago