fix struct API with an interface

Dicebot public at dicebot.lv
Thu Mar 6 10:08:55 PST 2014


On Thursday, 6 March 2014 at 14:28:13 UTC, Flamaros wrote:
> Ok, it's like I though final class and struct are equivalent 
> when calling a method (except the pointer deference, but it's 
> minor I think).
>
> I don't think there is a real performance problem for us, it's 
> more about to learn how to have a clean design.

They are equivalent when calling directly through class instance. 
When called though interface pointer, final class still results 
in vtable dispatch (because type system can't know stored class 
is final)

But if you need to inherit from existing interface it is best 
thing you have anyway.


More information about the Digitalmars-d-learn mailing list