Re:The faster you unlearn OOP, the better for you and your s...
by jryan49 on Sunday November 25, 2018 @08:58AM
(#18526872)
A lot of languages are made for this kind of interaction and can inline stuff hopefully, but that's the job for the VM or compiler.
I didn't say it was the "right" way to do it. Also programming is the art of tradeoffs. If this does actually give bad performance, maybe it's a trade off the programmer is willing to make.
Just like the article started off with "I don't think there's a silver bullet". OOP is a tool just like any other with pluses, and minuses.
Also the Hit class may be a Singleton and only instantiated once.
I didn't say it was the "right" way to do it. Also programming is the art of tradeoffs. If this does actually give bad performance, maybe it's a trade off the programmer is willing to make.
Just like the article started off with "I don't think there's a silver bullet". OOP is a tool just like any other with pluses, and minuses.
Also the Hit class may be a Singleton and only instantiated once.