DIP 1003 Formal Review

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sun May 14 12:00:59 PDT 2017


On 14.05.2017 18:36, Kagamin wrote:
> On Friday, 12 May 2017 at 18:03:43 UTC, H. S. Teoh wrote:
>> I disagree that `function` is not overloaded: it *will* be overloaded
>> if option 2 is chosen, because `function` currently means function
>> *pointer*, not the function body itself.  For this reason, I oppose
>> Option 2.
>
> Function literal includes function body.

auto add = function int(int a,int b)in{
     assert(0<=a && 0 <=b && a<=int.max-b);
}body{
     return a+b;
};



More information about the Digitalmars-d mailing list