|
|
|
|
|
by coldtea
1166 days ago
|
|
>And over that period, not a single person put forward a viable and fully worked-up proposal for how generics should work in Go. That was the official excuse (while each and every proposal coming in was shot down, just to get.a sub par, half-thought, Generics implementation, full of sui generis and NIH details implementation. It's not rocket science, there are 100s of languages with Generics, including languages with many orders of magnitude more than the adoption Go has. |
|
It's strange to describe the current implementation has "half thought". A lot of work was done to make sure it was correct: https://arxiv.org/pdf/2005.11710.pdf It's probably one of the most carefully thought through generics implementations in a mainstream programming language.
>It's not rocket science, there are 100s of languages with Generics, including languages with many orders of magnitude more than the adoption Go has.
It's easy to add generics but not so easy to get it right (see e.g. Java's soundness issues, the total mess of C++ templates). Rust's generics also have some dark corners (e.g. https://github.com/rust-lang/rust/issues/84857).