Is the compiler supposed to accept this?

Kenji Hara k.hara.pg at gmail.com
Wed Jul 10 21:59:00 PDT 2013


I filed the website bug in bugzilla, and posted pull request.

http://d.puremagic.com/issues/show_bug.cgi?id=10605
https://github.com/D-Programming-Language/dlang.org/pull/351

Kenji Hara


2013/7/11 Kenji Hara <k.hara.pg at gmail.com>

> This is accepts-valid behavior.
>
> function(parameters) => expr
>
> means the combination of:
>
> 1. specifying "context pointer is not necessary"
> 2. lambda syntax "(parameters) => expr"
>
> I think website documentation has a bug.
>
> Kenji Hara
>
>
>
> 2013/7/10 Brian Schott <briancschott at gmail.com>
>
>> While finishing up work on my parser and grammar specification I found
>> this in container.d:
>>
>> return equal!(function(Elem a, Elem b) => !_less(a,b) && !_less(b,a))
>>                      (thisRange, thatRange);
>>
>> It seems to be some strange hybrid of the function literal syntax and the
>> lambda syntax. It's not documented anywhere (surprise!) and I'm not sure if
>> I should support it or file an accepts-invalid bug against DMD.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130711/9ed55677/attachment-0001.html>


More information about the Digitalmars-d mailing list