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

I'm surprised no one mentioned that this is, conceptually, prototype-based OO.

Personally, in C++, I have found that mixins solve this problem well: http://www.cs.umass.edu/~yannis/practical-fmtd.pdf

And for everyone who balks at multiple inheritance, I present to you some of my own code, which uses mixins and multiple inheritance: https://github.com/scotts/cellgen/blob/master/src/xformers.h... Probably baroque to an outsider, but it solved my problem well, and enabled me to have a maintainable code base that I could also play around with when testing new ideas.



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

Search: