What would be the consequence of implementing interfaces as fat pointers ?
Daniel Murphy
yebbliesnospam at gmail.com
Sat Mar 29 20:26:42 PDT 2014
"deadalnix" wrote in message news:jizqsnuigdsvxhtcsshl at forum.dlang.org...
> All is in the title.
>
> This is becoming increasingly the norm in new languages. It is much better
> in term of performances (it avoid cascaded loads to call methods, which
> can be really costly on modern CPUs), make object themselves smaller.
>
> Would implementing them that way break D code ? What would be the extent
> of the breakage ?
It could, but we don't have a stable ABI and we don't allow directly casting
from interface references to classes. I would be interested to see how the
performance changes on some interface-heavy D code - and honestly without an
implementation that shows a big speed bump I don't think this will ever
happen.
More information about the Digitalmars-d
mailing list