The manual's section on variable scope sucks

I misread it then. So it’s = for the original definition and := optionally(?) for following reassignments, which doesn’t directly choose the outer versus local scope but would naturally fit because it’s more obvious a := versus = in a nested scope is outer versus local. Its static checks could involve more than a scope boundary.

On the other hand, I had imagined that explicit outer/local could evade the difference in default behavior between local and global scopes, allowing source code to behave the same between them, especially from macros intended to work in both. It didn’t really go anywhere because it was hard to imagine how metaprogramming could replace the default behavior with outer/local automatically when macro calls were involved.

1 Like