zsh-workers
 help / color / mirror / code / Atom feed
* Re: Scope of local parameters
       [not found] <2148.1052215470@csr.com>
@ 2003-05-07  8:39 ` Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2003-05-07  8:39 UTC (permalink / raw)
  To: Zsh workers

Peter wrote:
> 
> > Hmm ... making typeset create local parameters in sourced script by default
> > will definitely break a lot of existing scripts.

> > Probably extra argument to
> > typeset or (better) extra options to treat typesets in script as local.
> 
> Certainly possible, but will need some extra wiring.  I should think
> thre's some possible fudge involving locallevel, scanendscope and a new
> parameter flag, rather than adding a completely new mechanism.  I think

Except that the parameter code has enough fudges holding it together
already.

So that we don't end up with too many typeset flags, this could perhaps
be combined with some facility for ksh93 style lexical scoping. Perhaps
allowing scope to be restricted to within { ... }, do .. done and if
... fi blocks. Another option might be some syntax for in place
functions - some variant of the { ... } block in which local variables
would apply.

Oliver


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-07  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2148.1052215470@csr.com>
2003-05-07  8:39 ` Scope of local parameters Oliver Kiddle

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).