Lazily Initialized Variables that are Compatible with const/immutable
Timon Gehr
timon.gehr at gmx.ch
Fri Nov 18 11:06:44 UTC 2022
On 18.11.22 11:59, Timon Gehr wrote:
>
>
>> which is used to optimize performance (in Dart, `const` is closer to
>> D's `immutable`).
>
> Actually, it is closer to `static immutable`.
(But even that analogy has significant limitations, e.g., transitivity
of Dart `const` is often checked at runtime, even if it is completely
obvious during type checking that an assignment is not going to work.)
More information about the Digitalmars-d
mailing list