<div dir="ltr">On 9 June 2013 02:39, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 6/7/2013 8:59 PM, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Because they embody functionality, not just data. That's just how many many<br>
programmers write code.<br>
Go to university for a couple of years, see what they tell you... ;)<br>
Some of these systems can effectively be considered plugins. Consider<br>
OpenGL/DirectX? DirectSound/XAudio? Linux has a million back-end API's to choose<br>
from.<br>
I can see why many people feel it's natural to design their API's/systems that<br>
way, right or wrong.<br>
</blockquote>
<br>
<br></div>
So they don't need to be classes at all. It's not about embodying functionality vs data. It's about having a value type vs a polymorphic ref type.<br>
</blockquote></div><br></div><div class="gmail_extra" style>Hey? I'm not sure what you're saying..</div><div class="gmail_extra" style>I just said that people do use classes. And that implies a ref type with some amount of polymorphism.</div>
<div class="gmail_extra" style>These API's are reference based, and there is always a few virtuals. And these are just trivial examples, a large game unifies a lot of code from basically all fields of computing.</div>
<div class="gmail_extra" style>Trust me, I wouldn't bother spending all this time making a noise about the performance characteristics of classes if we didn't want/use classes.</div></div>