First Draft: Static Single Assignment
Tim
tim.dlang at t-online.de
Tue Nov 18 17:05:56 UTC 2025
On Tuesday, 18 November 2025 at 13:31:00 UTC, Quirin Schroll
wrote:
> It were much more useful as a qualifier. If it were a
> qualifier, it could be used in (almost?) all places it can be
> used as a storage class, but it could *also* be used for C/C++
> interop, where D currently lacks the ability to represent `int*
> const`. A `final(int*)` would be the perfect fit
For full C++ interop it would also be needed for the hidden
`this` parameter of methods, but `final` on methods already means
something different:
```
extern(C++) class C
{
void f() final; // Does final mean head const here?
}
```
The syntax could distinguish between `final` before and after the
declaration, but that could be confusing. It would be better to
use a different keyword for head const with C++ compatibility.
More information about the dip.development
mailing list