DIP66 - Multiple alias this
IGotD-
nise at nise.com
Mon Sep 28 15:01:45 UTC 2020
On Sunday, 27 September 2020 at 21:52:15 UTC, 12345swordy wrote:
>
> It been deprecated as Walter discovered that the current alias
> this introduce the diamond problem. That and other sorts of
> bugs that it has.
>
> -Alex
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.
More information about the Digitalmars-d
mailing list