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

How would that be a good idea? I don't understand how I could write effective software without polymorphism or inheritance, other than in tiny tiny applications.


I've written entire components for networked and multiplayer modes for games, and an algorithmic trading system that uses ML in C++ using just structs, unions, templates, functions and composition (no polymorphism or inheritance).


Inheritance is syntactic sugar for composition. But, I think of it as reverse-SS, because I find composition much more readable.


Think about this: what does it give you besides generic execution and data when the size of the data varies?

Templates already let you build generic data structures and algorithms when the size of the data on doesn't vary.




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

Search: