Arbitrary abbreviations in phobos considered ridiculous
Timon Gehr
timon.gehr at gmx.ch
Fri Mar 9 16:43:35 PST 2012
On 03/10/2012 01:10 AM, H. S. Teoh wrote:
> On Fri, Mar 09, 2012 at 06:50:50PM -0500, bearophile wrote:
>> Jonathan M Davis:
>>
>>> I don't know what the current state of UFCS is.
>>
>> I have found a possible problem in it, and probably there are some
>> missing parts, but it's working well.
>
> I found that x.foo doesn't work, it needs to be x.foo(). But we're
> deprecating omission of parentheses of non- at property functions anyway,
> and an external function can hardly be a @property of anything, so I
> don't think this needs to be fixed.
>
UFCS for @properties seems to work according to the unit tests.
However, this makes @property ambiguous. foo = 2 will be the same as 2.foo.
More information about the Digitalmars-d
mailing list