Re:C99/C11 dynamic array that mimics C++'s std::vector
by 72deluxe on Saturday January 07, 2017 @01:56PM
(#13345849)
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.
[ Parent
| on HN ]
Re:C99/C11 dynamic array that mimics C++'s std::vector
by sidlls on Saturday January 07, 2017 @02:40PM
(#13346134)
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).
Re:C99/C11 dynamic array that mimics C++'s std::vector
by psyc on Saturday January 07, 2017 @02:06PM
(#13345916)
Inheritance is syntactic sugar for composition. But, I think of it as reverse-SS, because I find composition much more readable.
Re:C99/C11 dynamic array that mimics C++'s std::vector
by CyberDildonics on Sunday January 08, 2017 @12:05PM
(#13350661)
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.