DIP27 available for destruction

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Feb 27 09:30:04 PST 2013


On 2/27/13, deadalnix <deadalnix at gmail.com> wrote:
> That is fallacy.

void func(T...)(T args) { }

int foo() { return 1; }
float bar() { return 2.0; }

void main()
{
    func(foo, bar);  // ???
}

What will this do? If address-of on functions is banned then this must
pass functions by default, and not their return types. Which is a
complete change to what it does now.

So now you have to carefully inspect every function call because you
don't know whether you're passing a pointer to a function or you're
invoking the function and passing the return type.

How on earth does this simplify anything and justify code breakage?


More information about the Digitalmars-d mailing list