Author Topic: Question ?!!!!  (Read 13598 times)


  • Hero Member
  • *****
  • Posts: 3191
  • Compiler Developer
Re: Question ?!!!!
« Reply #75 on: April 09, 2021, 02:23:54 pm »
AFAIK the fpc team is NOT going to implement this, regardless of language mode.

Afaik it was more diplomatic and more along the lines of "not in the coming 5 years, never say never".

Trying to be diplomatic, that's not really the impression that many if not most of the rest of us have of this long-term debate.

For this specific feature that is indeed the impression I personally am shooting for. I won't implement it and I also won't integrate any patch that implements this feature, because I don't support this functionality. I can't and don't speak for the other core devs however.


  • Hero Member
  • *****
  • Posts: 699
  • keep it simple
    • SharpBASIC
Re: Question ?!!!!
« Reply #76 on: April 10, 2021, 10:35:08 am »
I got some private response regarding type inference for loops, though.
In general inline declarations are evil imho.

I couldn't agree more.

My own take on it is that a local variable declared in a "for" clause is less evil than the current situation where the index variable is still in scope but has an undefined value upon exit from the controlled statement.

Declaring variables in and implicitly limiting them to the "scope" of a for-loop or other control block as various languages support is bad language design. The only clean way to implement this is by allowing explicit scope-block definitions, but for some well-defined and established languages even that wouldn't be an option as it could easily mess up existing scope rules.

An undefined iterator after a loop should not be an issue as the very purpose of its existence is iteration only.

Don't blame a well thought-through language design for bad programming behaviour.
« Last Edit: April 10, 2021, 10:39:04 am by munair »


TinyPortal © 2005-2018