property set/get
Brought to you by:
bonniot
I think I saw this as a request but it is not on the
current list.
A property set/get implementation makes for much nicer
synatax. C# has a fairly nice way of defining properties:
prop <type> <propname> {
get {
return mX; // a member variable.
}
set {
mX = value; //<value> is the new value to be set.
}
or set(value) {
// if you don't want to make value a reserved word.
}
}
Usage: A.x = "XXX";
println(A.x);
Instead of: A.setX("XXX");
println(A.getX());
Logged In: YES
user_id=88952
Yes, it is planned to work on this. You can have a look at
http://nice.sourceforge.net/cgi-bin/twiki/view/Dev/PropertySyntax
for a discussion on this feature. Comments and contributions
are welcome ;-)