@property needed or not needed?

deadalnix deadalnix at gmail.com
Tue Nov 20 13:47:49 PST 2012


On Tuesday, 20 November 2012 at 21:19:20 UTC, Timon Gehr wrote:
> On 11/20/2012 09:56 PM, deadalnix wrote:
>> On Tuesday, 20 November 2012 at 13:35:14 UTC, Adam D. Ruppe 
>> wrote:
>>> On Tuesday, 20 November 2012 at 06:06:21 UTC, deadalnix wrote:
>>>> I'm not sure how it fit in the DIP but &funName is ambiguous 
>>>> when
>>>> funName return a reference.
>>>
>>> We can just define this away: &funName if it isn't a 
>>> @property is the
>>> address of the function.
>>>
>>
>> So this is impossible to get the address of the returned
>> reference.
>>
>
> &funName()
>

So now funName and funName are not equivalent anymore. Special 
cases should be removed, not added.

>>> If it is a @property, ALL operations work on the return 
>>> value, so it
>>> is rewritten as &(funName()).
>>
>> I agree that this is ho it should work.
>
> +1.




More information about the Digitalmars-d mailing list