Functional programming in D and some reflexion on the () optionality.

deadalnix deadalnix at gmail.com
Tue Aug 7 04:07:06 PDT 2012


Le 07/08/2012 07:45, David Piepgrass a écrit :
>>> class A { void B() {} }
>>> auto a = new A().B();
>>> // ^ semicolon expected following auto declaration, not '.'
>>>
>> Obviously. No clue what this snippet is trying to do.
>
> Well I meant "int B() { return 0; }" of course. I think you deliberately
> miss the point.

According to what is described here : http://dlang.org/expression.html 
this is legal and is a dmd bug.


More information about the Digitalmars-d mailing list