DIP66 - Multiple alias this
mw
mingwu at gmail.com
Mon Sep 28 18:28:05 UTC 2020
On Monday, 28 September 2020 at 18:13:15 UTC, H. S. Teoh wrote:
> On Mon, Sep 28, 2020 at 05:59:19PM +0000, mw via Digitalmars-d
> wrote:
>
> As somebody already said, that's all well and good for Eiffel.
> It's not so clear how to integrate this nicely in D.
D has `alias` already, which can be used as Eiffel's `rename`,
and by introducing the other same keywords (mechanism), we can
adopt the Eiffel multiple inheritance.
D and Eiffel are close: D picked design-by-contract from Eiffel,
but throw away multiple inheritance,
... and instead introduced sub-typing, mixin,
which Walter said:
https://forum.dlang.org/post/rb4seo$bfm$1@digitalmars.com
"""
The trouble was, it was inserted without realizing it was
multiple inheritance, meaning its behaviors are ad-hoc and don't
make a whole lot of sense when examined carefully.
"""
If we really want to fix it, can do it in D3.
More information about the Digitalmars-d
mailing list