3 ms·
>The ability to have objects doing things C-structs work fine. In my experience, for things like games, C-structs are capable of doing everything you need obj
by xamuel 11y ago
>The ability to have objects doing things
C-structs work fine. In my experience, for things like games, C-structs are capable of doing everything you need objects to do. The lack of polymorphism and other OO stuff, makes C code easier to reason about and maintain.
- hellofunk 11y agoThe original creator of the C++ STL has said in interviews that after a long career of C++ development, he still never uses -- and sees no use for -- any model of inheritance for anything. I've since learned that my own C++ code is much better when I very sparingly, or never, subclass anything. This has the added benefit of also never using vtables.
- ArkyBeagle 11y agoIndeed - some of the worst systems I've worked on had very long subclass/inheritance chains. It ends up causing a lot of unnecessary coupling.