On Wed, Feb 20, 2019 at 4:35 PM Dimitrios Chr. Ioannidis via fpc-devel <
fpc-devel@lists.freepascal.org> wrote:

>   Even if declaring variables as close as possible to where the variable
> will be used ( debugging wise not readability wise ) leads to more correct
> code, the problem is to avoid the temptation to use them in other places
> too.
>
Variables declared within a begin...end cannot be used elsewhere. (E.g. for
var I:=0 to .. won't let you use I after the loop).

>   AFAIK, one of Pascal's primary design goals is to won't let you shoot
> yourself in the foot, and IMO that feature is not in that direction.
>
 I'd like to see an example how this is less safe.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to