On Saturday, 25 April 2026 18:38:09 BST Tomas Hajny via fpc-pascal wrote:
> it should be strongly discouraged because it is not compliant to Pascal.

Ummm... Let's use examples:

var in a parameter list. Meaning: pass by reference.
var inside a procedure/function block. Meaning: variable declaration.

Same keyword, yet two totally different meanings. But hey, everyone is okay 
with that.

There is already a clear precedent for 'var' having different meanings 
depending on context. An inline var simply defines and scopes a variable at 
the point of use. I see no harm is supporting it.

FPC already supports things like Generics and anonymous functions in some 
modes (which definitely weren't in Wirth's original Pascal), the "not 
compliant" argument feels a bit like moving the goalposts.

It's called language evolution.

Regards,
  Graeme





_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to