3 ms·
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 "ri
by jryan49 8y ago
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.