News for hackers. Stuff that matters.
Re:Swift Algorithms by Cthulhu_ on Thursday October 08, 2020 @03:39AM (#24716827)
Because generics is a nontrivial problem to solve in languages and compilers; a really great comment that I bookmarked is here: https://news.ycombinator.com/item?id=9622417. I read elsewhere (can't find it now) just how much lines of code and language spec is dedicated to generics in Java.

Right now, the Go spec + compiler chain are a lot simpler; adding generics would have made things a ton more complicated. Second, by first spending a lot of time perfecting the core language, understanding it, and resolving early issues, they have a much more stable base now to build generics on top of it. As the comment also implies, they take things slow and steady when it comes to Go; it's a language made to run core systems (e.g. at Google) for the next 30-50 years.

Re:Swift Algorithms by mhh__ on Thursday October 08, 2020 @02:09PM (#24721966)
All I can say to that is: Taking Java and C++ to be generics as god intended is not a particularly good thing to plan around. D's generics are concise, strict, relatively simple, and mostly understandable by mere mortals (in the compiler) - this is a totally solved problem for a language like D, if Go can't do it then it's their own fault.