Why can't I inherit (extend) structs?
Derek Parnell
derek at nomail.afraid.org
Sun Oct 15 18:41:38 PDT 2006
On Mon, 16 Oct 2006 09:20:42 +0900, Bill Baxter wrote:
> The response to "demands for multiple inheritance" should simply be "No".
>
> D doesn't support multiple inheritance for classes even, so it seems odd
> that it would go out of its way to allow it for structs. I see nothing
> wrong with just saying structs can only do single inheritance.
And I'd go so far as to say that the term 'inheritance' is a bit strong.
Maybe just 'derivation' as we would be deriving a new struct definition
from existing definitions, but there is no implied linkage between them at
runtime.
But this would have to be a 2.0 feature anyway as it is not a *required*
language feature.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
16/10/2006 11:38:37 AM
More information about the Digitalmars-d-learn
mailing list