News for hackers. Stuff that matters.
Re:The faster you unlearn OOP, the better for you and your s... by jcelerier on Sunday November 25, 2018 @08:58AM (#18526874)
> And this one line is why you're willing to setup all these crap boilerplate supporter classes and take a huge hit in runtime performance?

at least in C++, why would they ? it'll all gets inlined and you can do it so that there isn't any memory allocations if you know all of your cases at compile time (of course most of the time you want to be able to add new weapons, behaviours, etc, at runtime but in game engines you generally use scripting languages for this anyways).

Re:The faster you unlearn OOP, the better for you and your s... by jstimpfle on Sunday November 25, 2018 @09:32AM (#18526999)
It's nice that some C++ compilers can optimize this out. It means that it only costs maintainer cycles (less straightforward invocation), and compiler cycles. As every C++ programmer knows, there is an unlimited amount of them.