Is the address-of operator (&) really needed?

Sandeep Datta datta.sandeep at gmail.com
Fri Jun 1 11:22:33 PDT 2012


On Friday, 1 June 2012 at 18:07:12 UTC, Artur Skawina wrote:
> On 06/01/12 19:41, Sandeep Datta wrote:
>>>
>>>    import std.stdio;
>>>    @property f() { writeln("oops"); return 0; }
>>>    void main() { auto p = f; }
>>>
>>> artur
>> 
>> I understand what you are trying to say but I hear parens will 
>> become mandatory soon. This may not be a problem then.
>
> No, it's the other way around - parens are accepted now, but 
> shouldn't be.
> The whole point of properties is to behave as fields.

Ok, I overlooked the @property declaration. Sorry about that.

>
>> While writing code we expect the compiler to understand what 
>> we want to do without writing a lot of code.
>
> Do you really consider '&' to be "a lot of code"?
>

Actually no I don't consider it to be a lot of code but I think 
it is an annoyance nevertheless...one which I can live with.


More information about the Digitalmars-d mailing list