Am 06.02.2013 18:36, schrieb Andrei Alexandrescu:
On 2/6/13 12:33 PM, Benjamin Thaut wrote:
Am 06.02.2013 08:38, schrieb Andrei Alexandrescu:
Probably it'll need a fair amount of tweaking. Anyhow it's in
destroyable form.

http://wiki.dlang.org/DIP25


Thanks,

Andrei

What I don't get is, why is it better to have a function
"addressOf(value)" that does exactly the same as &value? Expect that it
is more text to type? Why is addressOf(value) more explicit then &value?

A good part of that is the recent debate on what &func should do (take
the address of the function vs. the address of its result). With the
unsafe meaning out of the way, only the safe one is eligible.

Andrei

Ok that makes sense, you might want to add that as a explanation to the DIP.

So the &value expression would only be left for taking addresses of functions? Wouldn't it make more sense to do it the other way around? E.g. create some utilty function that is only there for taking the address of functions and disallowing to do so by using &func?

Kind Regards
Benjamin Thaut

Reply via email to