Slow performance compared to C++, ideas?

Rob T alanb at ucora.com
Mon Jun 3 22:41:11 PDT 2013


Manu, I'm wondering that perhaps you should not be using classes 
at all. You can still create a similar overridable scheme for 
struct methods, and although it may not be as convenient, it will 
work. However a big failure point with stucts is the lack of 
inheritance.

Structs would IMO be far more useful if they had inheritance. 
Inheritence can be fully removed from the rest of polymorphism, 
so there's no reason why structs which are not polymorphic cannot 
inherit.

Actually I'd like to know why structs cannot inherit? I hate it 
when I end up creating classes when I have no other reason to 
create a class other than for the ability to inherit.

--rt


More information about the Digitalmars-d mailing list