On Thu, 29 Apr 2021 07:52:19 +0200
Sven Barth via fpc-pascal <fpc-pascal@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


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

Reply via email to