First Draft: Static Single Assignment

Dukc ajieskola at gmail.com
Mon Nov 24 18:58:44 UTC 2025


On Thursday, 20 November 2025 at 05:31:08 UTC, Walter Bright 
wrote:
> What you're proposing is "head const", which is what C and C++ 
> have. D has "transitive const". Try to change the type system 
> to support head const is extremely destructive, and likely to 
> be terribly confusing.
>
> That's why "final" is a storage class, which sidesteps the 
> issue.


What issues does it cause that this DIP avoids? Even this DIP 
will let you do

```D
struct HeadConst(T)
{   final T field;
     alias field this;
}
```


More information about the dip.development mailing list