On Wednesday, 10 April 2013 at 09:12:33 UTC, Manu wrote:The question is then "what is class?". Because the very reason to have class is to have guaranteed polymorphic behavior, so that working with object via its base will always make sense without any fears about what behavior can be overriden. But that is mostly needed in OOP hell with few practical cases like plugins.
... nar, I don't think so.
A class is a class, I'm not arguing for anything that's kinda-like-a-class,
I'm talking about classes.
If essentially coupling data and methods is needed, that is what struct does. I am not arguing that everything should be virtual, I am arguing that you actually need classes. It is not C++ and, in my opinion, structs should be much more common entities than classes, especially in performance-hungry code.