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

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Apr 29 09:00:47 CEST 2021


On Thu, 29 Apr 2021 07:52:19 +0200
Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

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

FPC does not.
Delphi does:
http://docwiki.embarcadero.com/RADStudio/Sydney/en/Inline_Variable_Declaration

begin
  var MyDictionary := TDictionary<string, Integer>.Create;
  for var I:=1 to 10 do ;
end.

> It is impossible to implement a syntax like you're suggesting without
> major rework of the parser. 

Indeed.


Mattias




More information about the fpc-pascal mailing list