On Friday, 25 January 2013 at 18:00:24 UTC, Rob T wrote:
So historically, the fist implementation of the property concept was through a syntax change, allowing removal of empty parens for the getter and assignment syntax for the setter.

That was actually before my time. The optional parens feature has been in D for as long as I can remember; it was there well before 1.0.

But yeah, @property was added a few years ago over concerns about a small handful of edge cases.

Why was a partial implementation of an experimental half-backed idea released into the wild?

This is the reason it is on a compiler switch, -property, instead of the main language. Without -property, the @property decoration is ignored. (And with -property, it doesn't do anything useful. The implementation is basically:

-property: break my code
@property: please don't break this code

It doesn't fix a single thing, and IIRC the implementor knew it; he just put it in as a first step toward something more complete.)

Reply via email to