DIP25 draft available for destruction
Benjamin Thaut
code at benjamin-thaut.de
Wed Feb 6 10:39:05 PST 2013
Am 06.02.2013 18:50, schrieb Andrei Alexandrescu:
> On 2/6/13 12:40 PM, Benjamin Thaut wrote:
>> 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?
>
> I don't think that would work without adding new keywords.
>
> Andrei
>
Whats so bad about adding a new keyword for this?
I fear that newcomers will find taking addresses pretty inconsistens if
we implement this proposal. Because the language will have the take
address operator "&" they know from c++, but it only works in some
special cases. For all other cases addressOf has to be used. It would be
much more consistent if you could use the "&" operator for everything
but taking the address of a function. That would be more consistent in
my opinion.
Lately I'm getting the feeling that D 2.0 is becoming a collection of
hacks to workaround issues which could be solved by adding new keywords
or doing other major changes. (like all the stuff that starts with __)
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d
mailing list