[fpc-pascal] Syntax changes suggestions

Henry Vermaak henry.vermaak at gmail.com
Tue Jul 17 11:44:35 CEST 2018


On Tue, Jul 17, 2018 at 09:32:24AM +0000, Mark Morgan Lloyd wrote:
> On 17/07/18 09:15, Henry Vermaak wrote:
> >On Mon, Jul 16, 2018 at 03:02:42PM +0200, Sven Barth via fpc-pascal wrote:> Santiago A. <svaa at ciberpiula.net> schrieb am Mo., 16. Juli 2018, 13:41:> > > I have some suggestions of change to freepascal syntax, just to debate> >> > (All are backward compatible)> >> > - Declaring variables inside blocks, and loop variables> >> -> reduces readability -> no interest
> >How can it reduce readability?  You move variables closer to where theyare used, therefore reducing clutter in the main "var" section.Limiting variable scope is definitely a good thing, I sure hope you'renot arguing against that.  That's why almost all languages encourage it.
> 
> Agreed, and that's /particularly/ the case with something like a loop
> control variable which should not be assumed to have a predictable value
> out-of-scope.

Spot on, you can pretty much eliminate that class of bug with this.

Henry



More information about the fpc-pascal mailing list