<div dir="ltr">On 10 April 2013 19:19, Dicebot <span dir="ltr"><<a href="mailto:m.strashun@gmail.com" target="_blank">m.strashun@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wednesday, 10 April 2013 at 09:12:33 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
... nar, I don't think so.<br>
A class is a class, I'm not arguing for anything that's kinda-like-a-class,<br>
I'm talking about classes.<br>
</blockquote>
<br></div>
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.<br>
</blockquote><div><br></div><div style>I think I've lost you here... this doesn't make sense. Where did I say virtual was bad, and it shouldn't exist? And how does my suggesting affect any guarantee of polymorphic behaviour?</div>
<div style>How is working with an object via it's base where only a small subset of the functions are designed to be overridden any less convenient? It makes no difference.</div><div style>What's more convenient is it's much more obvious what the user is meant to override, and what it should do (presuming the rest of the API is designed in a sensible way). The self documenting nature of the virtual keyword is nice.<br>
</div><div style>It's also _MUCH FASTER_!</div><div style><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>

</blockquote></div><br></div><div class="gmail_extra" style>Struct's are inconvenienced by other stuff. You can't create a ref local, thus you can't use a struct as a class conveniently. It also has no virtual table, how do you extend it conveniently? I'm not talking about struct's, I'm talking about classes.</div>
</div>