Constructor inheritance? Why not?
via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 8 03:32:25 PDT 2015
On Monday, 8 June 2015 at 09:20:06 UTC, Ola Fosheim Grøstad wrote:
> They can if you use type variables. Type variables can be
> virtual too.
And IIRC you can emulate type variables in D too if you dig into
RTTI, but I don't quite remember where I found that. I am sure
you know how to do it. IIRC it was not difficult.
You might want to look into that and polymorphic construction as
a library feature, it allows for dynamic generics. Not for every
day use, but allows some advanced modelling.
> but you had "inner" inheritance opposed to Simula/C++ "outer"
> inheritance.
Actually Simula has "inner" inheritance for the constructor and
not for the virtual functions, when I think of it, wheras Beta is
more consistent and have "inner" semantics on both. C++ just
messed that up in the translation.
More information about the Digitalmars-d
mailing list