zsh-workers
 help / color / mirror / code / Atom feed
* Important discussion about "local" on the POSIX list
@ 2013-10-17  0:27 Bart Schaefer
  2013-10-17  0:51 ` Chet Ramey
  2013-10-17  9:06 ` Peter Stephenson
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Schaefer @ 2013-10-17  0:27 UTC (permalink / raw)
  To: Zsh hackers list

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.

The discussion ranges over

(1) whether "function name { ... }" vs. "name() { ... }" syntax
determines whether a variable defined within the function has static
scope (ksh93) and the keyword used to declare it is irrelevant;

(2) whether "typeset" or "local" or something else would be used to
declare such variables;

(3) whether "local" would be allowed to have dynamic scope at all.

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-17  9:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-17  0:27 Important discussion about "local" on the POSIX list Bart Schaefer
2013-10-17  0:51 ` Chet Ramey
2013-10-17  9:06 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).