Is AliasAssign Now Official?

Paul Backus snarwin at gmail.com
Thu Aug 19 13:43:34 UTC 2021


On Thursday, 19 August 2021 at 06:23:52 UTC, surlymoor wrote:
> While reading through the spec to resolve some impressive 
> idiocy of mine, I noticed that [alias mutability (given some 
> constraints) is officially part of 
> D](https://dlang.org/spec/declaration.html#AliasAssign). 
> Previously, I knew this to be an experimental feature, and its 
> seemingly most salient benefit is that of a more readable 
> alternative to recursive templates. This is nice, but shouldn't 
> a DIP have been required for its inclusion outside of the 
> preview switch?

Yes, a DIP or -preview switch should have been required. However, 
Walter Bright, the author and primary maintainer of D, does not 
always follow the official process in this regard, and he is the 
one who added this feature.

> Might I and others use it knowing that it won't be rescinded in 
> future versions of the frontend?

Since it has been included in an official release of the 
reference D compiler, removing it would require a deprecation 
period, as described in [DIP 1013][1].

[1]: 
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1013.md


More information about the Digitalmars-d mailing list