ok I found better: see: http://forum.dlang.org/post/mailman.1002.1370829729.13711.digitalmars-d-le...@puremagic.com
On Tue, May 21, 2013 at 2:40 PM, Timon Gehr <timon.g...@gmx.ch> wrote: > On 05/21/2013 10:37 AM, Jonathan M Davis wrote: > >> On Tuesday, May 21, 2013 01:31:36 Timothee Cour wrote: >> >>> you can use a property function as a normal function if you have to. >>>> >>> >>> I must've missed that. Do you mean this will become valid? >>> struct A{ >>> int x_; >>> @property int x(){return x_;} >>> } >>> void main(){ >>> A a; >>> int x1=a.x(); >>> int x2=a.x; >>> } >>> >>> I don't think that it's really much of a loss to not be able to use UFCS >>>> >>> >>> in situations like that >>> >>> I keep running into such situations, because phobos reuses function >>> names a >>> lot in different modules, and it's only going to get worse as phobos size >>> increases. >>> >> >> It's not 100% clear what's going to happen with @property, but given the >> last >> major discussion on it, it's quite clear that we're not going to be >> strictly >> enforcing @property, and the -property flag is going to get the boot (I >> thought >> that it was removed from the Phobos build, but it looks like it's still >> there). It seems likely that @property will have no effect on getters, >> and it >> may or may not be required on setters. That matter wasn't settled, but >> it's >> very clear that strict property enforcement was not wanted by the majority >> (too many people want optional parens), so the situation where a symbol >> conflict with a UFCS property makes it impossible to call will be going >> away >> (and it currently only exists when -property is used). >> >> - Jonathan M Davis >> >> > No, it is the other way round. > > @property void foo(int x){ } > void main(){ foo(2); } // this compiles with -property. > > The consensus (modulo details) was that anything that -property implements > will not be implemented and anything that -property does not implement will > be implemented. > >