On Wednesday, 7 August 2013 at 17:01:36 UTC, Borislav Kosharov
wrote:
Yea, I don't like how you have to write properties in D. I
usually write them like this:
@property {
int myNum() {
return _myNum;
}
void myNum(int value) {
_myNum = value;
}
}
I saw that in the D conf it was stated that @property will be
changed? I was wondering if there is any progress on that and
how will the new properties look like? Are they going to be
replaced by templates or something else? Has anyone written his
own property generators?
There is a pending pull request from Kenji:
https://github.com/D-Programming-Language/dmd/pull/2305 , but
does not do anything crazy, just enforces existing approach and
addresses some of nasty corner cases.
I doubt it will ever change to something like in C# - as time
passes, people are more and more reluctant to make any breaking
change unless it fixes some really major problem.
I personally just avoid using them at all.