classes structs
bearophile
bearophileHUGS at lycos.com
Fri Sep 14 16:25:30 PDT 2012
On Friday, 14 September 2012 at 22:18:57 UTC, David Currie:
> Could you answer me WHY??
Take a look at the D FAQ, maybe some of your questions are
answered there, this will save some time to people here.
And your questions that are missing in the FAQ are better added
there, because they are quite basic and common.
The keyword "scoped" you probably refer to is deprecated when
it's used to allocate class instances on the stack. Currently
there is emplace() to allocate class instances in-place.
emplace() is not perfect and it's not much "safe", but maybe it
will become good enough.
Regarding the missing struct inheritance, take a look at "alias
this" (and template mixins), to compose struct behaviors. It's
not inheritance, but often it's quite handy.
Bye,
bearophile
More information about the Digitalmars-d
mailing list