First Draft: Static Single Assignment
Nick Treleaven
nick at geany.org
Sat Dec 6 11:45:21 UTC 2025
On Friday, 5 December 2025 at 23:25:41 UTC, Peter C wrote:
> also, if final is ever going to work with class fields, then if
> default initialization is considered an assignment, then you
> won't be able to write code like this:
>
> class Config
> {
> final int port; // declared, default initialized to 0
>
> this(int p)
> {
> port = p; // explicit assignment - allowed once.
> }
> }
No, read https://dlang.org/spec/class.html#field-init. That's
initialization.
More information about the dip.development
mailing list