First Draft: Static Single Assignment

Nick Treleaven nick at geany.org
Sun Nov 16 22:08:02 UTC 2025


On Sunday, 16 November 2025 at 01:50:16 UTC, Walter Bright wrote:
> https://github.com/WalterBright/documents/blob/master/final.md

```d
final int f = 3;
f = 4; // error, f is final
int* p = &f; // error, cannot make mutable reference to final 
variable
const int* pc = &f; // ok
```

So I assume `typeof(&f)` would be `const int*`?

```d
int i;
final int* pi = &i;
auto p = pi;
```
Is `p` final or const?



More information about the dip.development mailing list