> On Apr 27, 2021, at 4:53 PM, Graeme Geldenhuys via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> Why must the anonymous function repeat all that information again,
> as shown in the quoted code above? Can't the compiler figure all
> that out simply by inference? All the developer should have to do
> is give the 2 parameters a name, and a function body (block of
> code). Thus you could end up with something like this:
> 
> 
>     value.SortEntities((a, b) ->
>       begin
>         // do stuff with a and b, then
>         // return some integer.
>       end
>     );

I agree it's verbose but the syntax is already decided upon and implemented 
already.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to