I think Pike has too much syntax already...
/ Fredrik (Naranek) Hubinette (Real Build Master)
Previous text:
2003-12-23 00:13: Subject: C#-like properties
It could be combined with variants, perhaps:
variant accessor float inverse() { return 1/value; } variant accessor void inverse (float i) { value = 1/i; }
Another syntax that makes it look even more like a cross between a variable and a function declaration:
float inverse // Note: Not function arglist at all. { return 1/value; }
void inverse = float i { value = 1/i; }
I think it can be fit into the parser without ambiguities, but I'm not sure.
/ Martin Stjernholm, Roxen IS