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

Not necessarily so. Consider std::hash, which is a template heavily specialized by many types. Then containers like std::unordered_set use these specializations. You can totally turn a Rust trait into a C++ templated struct, and then turn Rust impls into template specializations of that struct.

> I have to say that framing reflection in terms of deriving an implementation of an interface is pretty powerful.

Just wait till you see Haskell's Generic. (Not to be confused with generics in other languages.) It turns out for most applications you don't even need to derive an implementation of an interface.




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

Search: