What is difference between struct and class?

Adam D. Ruppe destructionator at gmail.com
Mon Jun 3 00:47:27 UTC 2019


On Monday, 3 June 2019 at 00:17:08 UTC, Rnd wrote:
> What additional features do classes offer in D?

Classes support built-in runtime polymorphism through 
inheritance. structs don't.

As a result of this, classes are a little bit heavier 
resource-wise and are semantically always object references.


More information about the Digitalmars-d-learn mailing list