I wish properties (ala Delphi and I guess C#) were a language feature (and no Java Bean like introspection does not count).
Currently getting and setting encapsulated member variables (ie not a public member) is accomplished with get and set methods:
someVariable = MyObject.getSomePropertyValue;
It is my view that setting and getting encapsulated member variables should be done through the assignment operator.
someVariable = MyObject.someProperty;
MyObject.someProperty = someVariable;
There would still be get and set method for doing the work:
private int fWidth;
// the width property definition
// note: if there is no write path defined
// then the property is read only
width: int read: getWidth write: setWidth;
private int getWidth()
private void setWidth(int aWidth)
if (aWidth > 0)
fWidth = aWidth;