Perhaps it's my inexperience, but why is inline variables desireble on a greenfield (no porting) project?
The reason is simple: inline vars violate the Pascal paradigm of strict separation of declaration and implementation.This is a good argumentation, but I think is like the famous paradigm:
(@CDBC can rest assured that he won't see this improvement any time soon :D )Uhhhmmmm, Me Likey :D
Does FreePascal support inline variable declaration like Delphi 12? […]Although the FPC intends to be a Delphi‐compatibile compiler (https://www.freepascal.org/faq.html#isoxpascal) and implementation of said extension has been requested in tickets #34486 (https://gitlab.com/freepascal.org/fpc/source/-/issues/34486), #34660 (https://gitlab.com/freepascal.org/fpc/source/-/issues/34660) (GitLab.com uses Cloudflare and therefore might not be accessible to you [blocking for various reasons]. GitLab.com uses GitLab and therefore might not be accessible to you [reliance on JavaScript].), the FPC does not support “inline” declarations of variables and the tickets have been turned down as “not a bug”, i. e. not a deviation from desired behavior.
Ok lets see If I can show an example.This is not legal. You cannot use variable names already used anywhere in the unit. But the proper exampleis this:Do we really want this confusion?
var A:Integer; Begin //.. some code; If whatever then Begin Var A:integer; //Some code If whatever then Begin Var A:integer; // some Code; end; End; End;
Jamie
FPC is missing useful features not due to technical limits, but because a few peoples tastes and ideology block the rest.
@Thaddy "inline vars violate the Pascal paradigm"
@Martin_fr "short time convenient. I.e. for a quick and dirty..."
@Thaddy "it is not Pascal"
@jamie "Do we really want this confusion?"
And "The useful features" bit is not about tasted and ideology? Come on!
It would be aeons till it is in releases anyway, if it were implemented in trunk now.
None of those are FPC team. None of those are decision makers for that particular issue.
forked by anyone who want to go a different path
I propose don't start again another "var inline" discussion.
None of those are FPC team. None of those are decision makers for that particular issue.
They are the "FPC veterans" who keep backing the usual excuses for not implementing new features.
So being around for longer forbids me to voice my opinion?
So being around for longer forbids me to voice my opinion?
Nobody said your opinion isnt welcome, but that doesnt mean it cant be questioned or challenged.
They are the "FPC veterans" who keep backing the usual excuses for not implementing new features.
As a Pascal veteran
I don't give a damn if there are people in the Delphi community who think that such things are OK.