2013/2/4 Andrei Alexandrescu <[email protected]> > We need to add this to the proposal. There are two schools of thought here: > > 1. Make properties emulate regular variables as much as possible. In that > case &a.p is the same as &(a.p), i.e. it applies to the returned value. > (One counter-argument here is that properties should seldom return a > reference because that breaks encapsulation.) > > 2. Allow people to do whatever they need to do without much aggravation. > In that case &a.p obeys the normal rules of taking a method's address, and > &(a.p) applies to the returned value. > > I favor (2) and put it in http://wiki.dlang.org/DIP23. Will talk to > Walter.
I have thought about the problem, and filed an enhancement. http://d.puremagic.com/issues/show_bug.cgi?id=9062 But, Walter disagreed against it. http://d.puremagic.com/issues/show_bug.cgi?id=9062#c13 Kenji Hara
