DIP66 - Multiple alias this

mw mingwu at gmail.com
Mon Sep 28 17:59:19 UTC 2020


On Monday, 28 September 2020 at 15:01:45 UTC, IGotD- wrote:
> On Sunday, 27 September 2020 at 21:52:15 UTC, 12345swordy wrote:
>
> I must criticize the cop out that many language designers claim 
> about the diamond problem. The diamond problem is mainly an 
> academic problem which doesn't happen much in real life. I have 
> programmed C++ for decades and I have only encountered the 
> diamond problem once in my lifetime and this because I was 
> hacking around, changed the solution shortly after so that it 
> could do without "public virtual". You can come very far with 
> multiple inheritance without the diamond pattern.
>
> Are you saying that the detection of the diamond inheritance 
> pattern is hard to implement, I would say that it isn't. If it 
> detects, just emit a compiler error telling the user that such 
> pattern isn't allowed.
>
> The diamond problem is like a fantasy monster under the bed of 
> the language designers.

I think this deserved to be better known:

The diamond problem is a *solved* problem by Eiffel language, 
which won the 2006 ACM Software System Award:

https://en.wikipedia.org/wiki/ACM_Software_System_Award

And I showed the concrete example here:

https://forum.dlang.org/thread/obqthozmxwzhvrafothw@forum.dlang.org




More information about the Digitalmars-d mailing list