Struct inheritance

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Dec 6 12:07:43 UTC 2024


On Friday, December 6, 2024 4:42:14 AM MST Nick Treleaven via dip.ideas wrote:
> On Friday, 6 December 2024 at 01:04:37 UTC, Jonathan M Davis
>
> wrote:
> > class A {}
> >
> > class Foo
> > {
> >
> >     A a;
> >
> >     alias this = a;
> >
> > }
> > ```
>
> Deprecating that was attempted:
> https://dlang.org/changelog/2.103.0.html#dmd.deprecate-alias-this-for-classe
> s
>
> Is deprecation/removal planned for a future edition?

Walter seems to think that we cannot remove alias this, but he's quite
averse to removing anything at this point, because he's paranoid about
breaking code and just generally seems to be against deprecating anything. I
don't know what he'll be willing to consider when it comes to alias this and
editions. At present, I don't think that much of anything is actually
planned for editions in terms of what we're going to change. Ideas have been
bandied around, and Walter should be more amenable to breaking changes with
editions (since that's at least partially the idea behind them), but we'll
have to see what actually happens.

- Jonathan M Davis





More information about the dip.ideas mailing list