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

You can also have structs be generic over some "tag" type, which when combined with trait definitions gets you quite close to implementation inheritance as seen in C++ and elsewhere. It's just less common because usually composition is all that's required.



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

Search: