Of course you can It's just that OOP is built around abstraction The ideal way to do OOP on paper is you never knowing what's behind an interface, and interfaces are your only access to data It's built entirely around that concept, which is also why when it's actually implemented, a lot of it is ignored
I would say not that the "ideal way" but the "idealized way" It is good to be critical of how we do things in game devs, particularly when some performance squeezing may be required. Doing things a certain way because "muh OOP" is not guaranteed to provide either the best API nor the best performance, just an OK API and barely OK performance
Yeah I think idealized is a better expression And yup, I absolutely agree Even in less performance demanding scenarios, abstracting everything away gets so annoying so fast C# specifically, kinda tells you not to go overboard For example, when it detects something can be devirtualized, it tells you to do it
Обсуждают сегодня