On 2/4/13 10:30 PM, Chad Joan wrote:
On 02/04/2013 05:28 PM, Andrei Alexandrescu wrote:
On 2/4/13 2:04 PM, Jonathan M Davis wrote:
We could save a lot of boilerplate code if we can simply make it
variables and
property functions guaranteed to be swappable without breaking code.
I think this is quite powerful. The way we can do this is by making
properties emulate a subset of actual variables.
Andrei
I agree with Jonathan.
Please do not make them a subset. Make them as identical as possible.
The subset thing makes them no longer "swappable". Allow variables to be
marked with @property to limit them to operations that @property
functions can do, and make sure @property functions are limited to what
@property variables can do (ex: no address-of!). With that in hand,
they'll be very swappable.
The purpose is to replace members with properties, not to change one's
mind back and forth. There will be no marking of variables with
@property as that can be easily achieved by actually making them properties.
Andrei