Static attributes & immutability, static attributes seen from

bearophile bearophileHUGS at lycos.com
Sat Mar 6 05:41:22 PST 2010


Walter Bright:
> I think that's unworkable, as static variables cannot immutable in one 
> instance and mutable in another.

If you want you can express your opinion about the second part of the post too. Some people (I think 4 so far) more or less want to disallow the access of static fields from an instance.

Generally in my D/Python code I prefer to access static field using the class/struct name, to reduce possible confusion.

Bye,
bearophile



More information about the Digitalmars-d mailing list