[fpc-devel] Delphi anonymous methods
Sven Barth
pascaldragon at googlemail.com
Mon Mar 4 15:49:15 CET 2013
Am 04.03.2013 15:42, schrieb Martin:
>
>> but (4) is powerful enough to really make functional-style programming
>> practically
>>
>
> I can live with that. I find it odd so that "as" is used in the
> reverse order compared to current use.
The use of "as" is based on an idea of mine. C# for example has "=>" and
Oxygene has "->" which I didn't consider much Pascal like. Also the
compiler needs to know the type of the lambda so it can correctly
typecheck its code (after all we have no type inference (yet :P )). So
"lambda PROCVARTYPE as EXPR/STMT" came as the most "natural" and Pascal
like variant.
Regards,
Sven
More information about the fpc-devel
mailing list