Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's about what I was going to say. Traits have no data of their own. If you need that, you have to construct it, with a data object in each trait instance and access functions for it. It turns the notion of inheritance inside out. Awkward enough that it's only done if absolutely necessary.


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

Search: