Martin Frb via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb am Mi.,
28. Apr. 2021, 19:26:

> On 28/04/2021 18:43, Graeme Geldenhuys via fpc-pascal wrote:
> > Hello Sven,
> >
> > On 28/04/2021 6:32 am, Sven Barth via fpc-pascal wrote:
> >> Second: the syntax is required for Delphi compatibility anyway
> > Couldn't such verbose syntax be limited to {$mode delphi} behaviour,
> > and then leave {$mode objfpc} free to experiment and introduce new
> > less verbose syntax in the language.
>
> Would omitting the type info not lead to issues with overloaded functions?
>
> foo(function(a,b)
>
> Foo could have lots of overloaded arguments, all taking a callback with
> 2 params.
> Or it does not have them yet, but later.
>

It would have to derive the types from whatever is done inside the
anonymous function and even then that could lead to situations where the
parser would need to give up. I had already thought about such things as
well when I had played around (in my mind) with a slimmer lambda syntax.

Regards,
Sven

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

Reply via email to