logoalt Hacker News

Cpollyesterday at 8:21 PM2 repliesview on HN

Agreed. Generics are in most modern typed languages, and traits are essentially interfaces. Maybe templates means C++ templates, which are essentially generics?


Replies

nesarkvechnepyesterday at 9:25 PM

In C++, concepts are essentially generics where templates are more like weird macros.

mihaelmyesterday at 9:06 PM

My guess is they meant metaprogramming in general (templates/generics, macros), but traits are not quite like the others.