[fpc-pascal] [fpc-devel] Nested function closures

Sven Barth pascaldragon at googlemail.com
Thu Apr 29 07:52:19 CEST 2021


Graeme Geldenhuys via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb
am Mi., 28. Apr. 2021, 19:00:

> 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.
>
> Granted I fully understand that that would have the negative effect that
> many thing would have to be implemented twice. It just feels like FPC
> can't progress much with the Object Pascal language, because everything
> must be "Delphi compatible". :-( This result in FPC always being one step
> behind, and Embarcadero doesn't always make the best decisions for the
> language either.
>

You completely ignored my first point, which in this case is the much more
significant one: Pascal does not support type inference.

It is impossible to implement a syntax like you're suggesting without major
rework of the parser. That is something we're not willing to do with only
the possible and in the grand scheme of things very minor benefit of a
slimmer syntax.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210429/85f4ceab/attachment.htm>


More information about the fpc-pascal mailing list