On Thursday, 7 February 2013 at 21:05:49 UTC, Robert wrote:
You missed the point. When this gets lowered to accessor functions and a private variable, you ensure that you can later on add your magic soup, without breaking code that relied on i being a real field. (E.g. taking
the address, using +=, -=, ...)

Quite likely I missed the point.
Today I have:
struct S
{
  @property int i;
}


Tomorrow I decide I need to track every time int i is read and written.
How is that done?
I assume that that sort of encapsulation is what we are after.

Thanks
Dan


Reply via email to