Poll: a nonstate keyword
Steven Schveighoffer
schveiguy at yahoo.com
Thu May 29 09:41:21 PDT 2008
What if D2 were to introduce a keyword that allows you to decouple a class
member from the class state for the purposes of const? This keyword
basically means that the member is stored with the class data but is
unaffected by the constancy of an instance. In other words, a non-state
member variable is not cast to const when the class instance is cast to
const. This is an implementation of the 'is associated with' OO
relationship. This is similar to the 'mutable' keyword in C++, or the way
mutexes work in D.
If this were to happen, would you consider this to be a positive, negative,
or inconsequential change?
Would you stop using D because of it?
Would you switch to D2 because of it?
Would you consider this concept hard to explain or understand?
More information about the Digitalmars-d
mailing list