Can we just have struct inheritence already?

Meta jared771 at gmail.com
Mon Jun 10 16:44:35 UTC 2019


On Monday, 10 June 2019 at 14:54:06 UTC, Ola Fosheim Grøstad 
wrote:
> On Monday, 10 June 2019 at 14:42:41 UTC, Andrei Alexandrescu 
> wrote:
>> Nonsense. Again: the feature exists in C++ and is explicitly 
>> forbidden by all coding standards. If they could turn the time 
>> back they wouldn't have it. So... why would we now imitate it 
>> alongside with its mistakes? If you have a great idea on how 
>> to improve on it, sure. Otherwise, just don't.
>
> Err... that claim makes no sense to me.
>
> Just look at the implementation of the C++ standard library, it 
> is used all over the place!  With multiple inheritance even. 
> For good effect, actually. (Although I seldom use multiple 
> inheritance myself.)

IMO, that's a fallacy. There are constraints on a language's 
standard library that don't exist for user code, such that 
sometimes weird stuff has to be done to avoid or limit breaking 
changes (I'm not saying this necessarily *is* the case for C++'s 
stdlib; I'm not familiar enough with the implementation to 
comment).

Just look at all the outdated and suboptimal stuff in Phobos.


More information about the Digitalmars-d mailing list