3 ms·
A lot of times for a quick program I end up writing essentially C + C++ standard library, because a lot of C++ features related to better organizing of code are
by InfiniteRand 6y ago
A lot of times for a quick program I end up writing essentially C + C++ standard library, because a lot of C++ features related to better organizing of code are overkill when you have only a few files, but avoiding manual string management makes it worth using g++ instead of gcc
- nikki93 6y agoI think you can get far with this type of code organization, and using methods just for easier name lookup of functions associated with a particular type (static lookup -- no vtables / RTTI). Function overload sets are also useful. Libraries like https://github.com/skypjack/entt https://github.com/skypjack/entt really help here too--for an 'ontology of alive objects' its felt like using an entity-component-system has been more ergonomic vs. a big tree of inheritancey classes.
- ddgflorida 6y agoI've always liked plain C better than C++ yet I sure wish they would've had a true string type like other languages. Most bugs originate from the str family of routines.