Hacker News new | ask | show | jobs
by glouwbug 1990 days ago
Eh, even C supports clean templated type safe containers:

https://www.github.com/glouw/ctl

Why Go is so far behind is behind me

1 comments

There is a big difference here. The draft is about adding generics to the Go stdlib, not about if it's possible. Is it even possible? Yeah, there are some implementation (e.g. https://github.com/cheekybits/genny). So Go is not "far behind" C, which also does not have generics (or did I miss something in C11/C17?).
You missed, C17 introduced lightweight generics via _Generic and C2X plans to extend it further.
Tiny correction, _Generic was introduced in C11.
Thanks, that is what happens when I don't cross check my memories. :)