1
Programming / Re: How not to write C++
« on: October 14, 2022, 10:38:41 PM »Quote
The main problem with Avanor's code is that it's not C++, it's C wrapped in classes in a bad way. It's using none of OOP principles and in particular there are no traces of datatype classes, instead (almost) everything is plain old variables stuffed into large-ish classes. The code itself is old school large if/switch structures (typical in C code). I think Avanor points out perfectly the inability of a programmer to understand OOP (or any specific paradigm). If you just use classes to fill in with procedural code it's not OOP at all. Classes are only used as simple data containers, a lot like structs.
Sounds like me to a T. I just have a global struct with all my game's state. I'm a noob so what do I know? I'll give the codebase a look