3 ms·
What I find most notable about Handmade Hero is that Casey doesn't follow the mindless OOP mentality that is currently prevailing. I have been using more and mo
by ndh2 9y ago
What I find most notable about Handmade Hero is that Casey doesn't follow the mindless OOP mentality that is currently prevailing. I have been using more and more free functions, for example. It really made me question a lot of what is considered best practices.
For my personal projects I've adopted a lot of his style, which is very enjoyable to work with, and I found no downside.
- 0xcde4c3db 9y agoThis is probably a horses-for-courses thing. Typical OOP patterns are a poor fit for the lower-level aspects of a real-time game engine, where you really need to know what's happening on the critical path. Things like GC and constructors/destructors/finalizers can become an imposition rather than a convenience if they're not kept out of the main loop, and that can put you at odds with the usual idioms in an object-oriented setting. I think the biggest benefits attributed to OOP are really from splitting up the namespace into more manageable pieces. This can and usually should be done in larger C and C++ projects even if you're not using an OOP approach. The defaults in this regard are a little unfortunate, but both languages provide tools to do it (internal/"static" linkage in C, namespaces and using declarations in C++).