www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 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.

Jul 11 2004