Hacker News new | past | comments | ask | show | jobs | submit login

Yes, considering the impact to the standard library, but generics are very hard to do well. The C++ language committee is still 30 years later dealing with the fallout from the underspecified initial template implementation. Java's implementation seems to get mixed reviews.



Yes, it’s not easy, but not designing them in from the beginning only imposes further restrictions on the eventual design. And the lesson has been that generics will have to be designed in at some point for the language to stay relevant. Nowadays we at least have more existing languages — and advances in type theory — to learn from.


I would say that C++ templates have been extremely successful. The reason that the committee keeps tinkering with them is that users keep asking for even more features (very very few languages have all comparable features, so it is certainly not a matter of catching up).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: