Declare variables anywhere

Another limitation of block for this use case is that if you want to declare a variable near where it’s first used, and you also want to use it further down in the program unit, the block construct may become large. And if you do this for multiple variables that are introduced in several places in the program unit, you end up with multiple nested block constructs, which would make the source cluttered and likely more difficult to read and understand. So, IMO using block for this works against the benefits of the proposed feature.

1 Like