structure inheritance and polymorphism

zjh fqbqrr at 163.com
Thu Jan 7 11:51:36 UTC 2021


On Thursday, 7 January 2021 at 11:24:14 UTC, sighoya wrote:

I don't like quirky skills. I like to use it out of the box. Just 
like C++, C++ can be used directly.what you say is right, since 
the structure should not be polymorphic. Then, D can make 
something similar to structure / class/interface, because there 
are many kinds classes. It doesn't need to have a root class like 
Object. It also has a hierarchical.may be have to use 
`extern(c++) class`?
However, the current structure still does not support 
inheritance. Even if it does not need polymorphism, inheritance 
is good, because it can simplify a lot of code. I don't agree 
with the exclusion of D structure on inheritance. Inheritance is 
a good tool.




More information about the Digitalmars-d mailing list