Hacker News new | past | comments | ask | show | jobs | submit login

This 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++).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: