4 ms·
This is a bit like saying that English is a language superior to Danish, because there are better books out there in English. I don't think this has anything t
by lqet 8y ago
This is a bit like saying that English is a language superior to Danish, because there are better books out there in English.
I don't think this has anything to do with the language, it just happens that C++ ships with a much bigger standard library than Go.
- Nimelrian 8y agoIt's much easier to implement in Javascript, too, even though JS has a much smaller standard library. The main problem is Go's lack of generics.
- bryanrasmussen 8y agoindeed, currently the standard library of JS is incredibly small.
- johannkokos 8y ago> it just happens that C++ ships with a much bigger standard library than Go. I thought go had much bigger standard library. Go has archive, compression, crypto, database, encoding, hash, html, and net etc.
- icebraining 8y agoIt does have to do with the language. Writing a generic Set type is trivial in many languages, yet hard in Go.
- saagarjha 8y agoKeep in mind that I’m not saying that C++ is a better language than Go here: I’d need a lot more evidence than an array deduplication routine to prove this. I’m just saying that Go is ill-suited for this particular task as compared to C++, and the author is struggling with this as they go through with implementing their algorithm; this leads them to settle on a clumsy and inefficient “solution” because there isn’t really a good alternative in the confines of the language that they chose. (FWIW, C++ does have a good standard library for implementing algorithms but this doesn’t really come into play here, since we’re not doing anything advanced. Any language with a set and filter would do the job. And for the record, I do think that C++ is a better language than Go, but I’m not going to argue it here because I don’t know the latter well enough to be confident in my viewpoint and don’t have enough space here to discuss it here if I did.)