First Draft: Static Single Assignment
monkyyy
crazymonkyyy at gmail.com
Sun Nov 16 03:12:08 UTC 2025
On Sunday, 16 November 2025 at 02:43:03 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> Three things I'd like to see here:
>
> 1. Function parameters
>
> 2. Fields
>
> 3. Globals
```d
struct writeonce(T){
final T data;
final bool hasBeenSet;
auto opAssign(T data_){
assert( ! hasBeenSet);
return data=data_;
}}
```
---
`void foo(ref final int a)` it would need to be ref to do anything
More information about the dip.development
mailing list