July 11, 2004 readonly | ||||
---|---|---|---|---|
| ||||
The readonly attribute from C# would be a useful addition. It allows you to set the value a field in the constructor/static constructor, but from then on the field can never be written. It's like a const but where you calculate the initial value at runtime. Si |
Copyright © 1999-2021 by the D Language Foundation