On Mon, Jul 27, 2009 at 7:33 PM, escalan<[email protected]> wrote: > Hi, I'm new here. A simple idea I've had is to simply use aliases for > defining properties. > > If you allow writing aliases as expressions, you have get properties. Then a > simple extension to the syntax would also allow for writing set properties. > > alias (a) property; > alias (a = n) property(n); > > foo(property); // Get > property = 32; // Set > > This virtually eliminates any problems with properties, and it doesn't > require any new keywords. It won't break existing aliases either. >
Except if you want to do anything more complex in your setter/getter than a simple expression.
