Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Important discussion about "local" on the POSIX list



On Wed, 16 Oct 2013 17:27:34 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> austin-group is discussing a proposal to make local variables
> lexical/static in scope, rather than dynamic in scope as in bash and
> zsh.
> 
> I don't seem to be able to post to that list, so if there's someone
> here who still can, please have a gander and chime it.

I'm not on that list at the moment --- I didn't sign up again when I got
transferred from CSR.

> It would be rather difficult in zsh's implementation to enforce
> lexical scoping, so we'd be faced with either giving up POSIX
> compliance or doing a massive rewrite.

It does seem unlikely we'd be implementing lexical scoping.

If we ever did, it would have to be an option.  The assumption that we
can address local variables in enclosing functions is very widely made
in function suites, presumably including many we never see.

pws



Messages sorted by: Reverse Date, Date, Thread, Author