4 ms·
The author is implying that most of the "you don't need generics" arguments come from Go's users and not Go's creators. I don't have a good feel for whether th
by stanleydrew 10y ago
The author is implying that most of the "you don't need generics" arguments come from Go's users and not Go's creators.
I don't have a good feel for whether that's true of the Go community, or maybe more importantly whether it's relatively more true of the Go community than, e.g., the Python community.
- zigzigzag 10y agoArguments like "you don't need generics" or "exceptions lead to convoluted code" or "assertions are only used by lazy programmers" came from Go's creators. I too am rather surprised to see Go, Lisp and Haskell cited as languages designed by people who are not dogmatic. This may well be true at the micro-level of decisions like "how do you best compile green threads", but at the higher design levels all three languages are very, very opinionated. I think statement in particular is questionable: Contrast that kind of discussion with the heated arguments or overly zealous statements you sometimes see from users of the same languages. There's a real disconnect, possibly because the users don't have the experience of weighing the arguments on both sides and don't realize how easily a particular decision might have gone the other way. What is this implying? The designers of Go and Haskell never make "overly zealous statements" or "heated arguments"? Isn't the history of Go littered with such arguments, the most famous being that Go is simple because it's designed for Google engineers, who can't handle complex languages? It's definitely true that language communities are often zealous: when library interop is bad they have to be, in order to get an ecosystem of libraries and tools. That's why you see people posting things like "I made a terminal emulator in Rust" to Hacker News but don't see people posting the same for C++ or Java. Those languages have established ecosystems already and need much less evangelism.
- weberc2 10y agoBeing opinionated is pragmatic, not dogmatic. No successful carpenter uses a swiss army knife instead of a screw gun.
- marcosdumay 10y agoDon't know about Go, but the one thing you don't see in the Haskell community is zealotry. Being opinionated is not the same as being dogmatic. Haskell developers have a clear position of letting features get in the language as the community pushes for, and the overall guidance is very much open to changes. The one thing you won't hear there is any equivalent of "generics are bad for you, we are not adding them".
- yarrel 10y agoAnd Monads are like pizza.
- marcosdumay 10y agoDonuts. Monads I can grasp, but never got how they are like donuts.
- rhinoceraptor 10y agoGolang also has its own bespoke assembler, with unique syntax: http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/ http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
- grey-area 10y agoStrong opinions are not dogma as long as they are open to understanding the other options and change (as here). I think he's just trying to say that people should be less tribal and dogmatic about their tools, ,and users should try to understand that language design is about trade offs, not holy war. I think it is unhelpful to lump rsc in with rob pike, they are very different personalities.
- rhencke 10y agoFor a year or so, I used to make minor contributions to the Go programming language codebase, back before it hit 1.0. That certainly by no means makes me an expert on it, nor do I claim to be someone of the caliber of Russ Cox or Rob Pike, but I did do a lot of reading on golang-dev and golang-nuts, before the language was settled on 1.0. There were a lot of discussions on generics, and the language authors and contributors were certainly open to ideas and indeed did their own fair share of research. For example, see https://research.swtch.com/generic https://research.swtch.com/generic from 2009. Indeed, the FAQ entry itself on Generics states 'Generics may well be added at some point. We don't feel an urgency for them, although we understand some programmers do.', and looking at the blame log, that's from 2010 or earlier, and it's stuck to this day. So, from everything I can see, the creators themselves are certainly open to the concept - I don't see any "you don't need generics" coming from that side.
- stablemap 10y agoSee also this document by Ian Lance Taylor, which links to his four attempts at generics: https://github.com/golang/proposal/blob/master/design/15292-generics.md https://github.com/golang/proposal/blob/master/design/15292-...