From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8142 invoked by alias); 30 Sep 2015 03:06:15 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36710 Received: (qmail 12893 invoked from network); 30 Sep 2015 03:06:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:in-reply-to:comments:to:subject:mime-version :content-type; bh=dlSSt9JbL99JlRvo9iMQDFCGPuzkYmVddV6Z2P0rK+4=; b=Gxk23PEXYEZuV/IpW+PmdSnlw91e98gmra6Ih43Xu91gwSpAaZw7SArSmjUztfreM8 EoS4yuNpWiwIvZbh1ba4/wl7Jb7AbRe3Gh02MD4SGk5YjGD0oZ/HRcMNx+hb3j4FK+MP nhRrOZoh9q4zlGgqY3YN1VaQCZBejz4reiD/CfCRd0s7pmDvdydIGS6V3yzmhBQxCiNF zbznLEmO7LSrYY6kunTo9EFShYhKvx0YEpW9xKus+AP9pa2Znqoieh9hXFXNtgcQ2Bob T17yOYhqcE5VU34kPLHmXkhGYkVRrKYdVQhSCAMAyYwJuiuRwuo64lbEBYWNFg7WABE/ 6iUw== X-Gm-Message-State: ALoCoQlezJoxaQ4+WwpFJgUykfzH0BtZTRuwBXdpMu74rBLI9uYLY+kMhzlhuoElkp3Xp4RO7jLI X-Received: by 10.60.131.240 with SMTP id op16mr909988oeb.50.1443582371791; Tue, 29 Sep 2015 20:06:11 -0700 (PDT) From: Bart Schaefer Message-Id: <150929200608.ZM9539@torch.brasslantern.com> Date: Tue, 29 Sep 2015 20:06:08 -0700 In-Reply-To: <20150929223459.GD2005@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: Proof of concept: "static" parameter scope" (Sep 29, 10:34pm) References: <150924192305.ZM2680@torch.brasslantern.com> <21593.1443459899@thecus.kiddle.eu> <20150928175834.GE3670@isis.sigpipe.cz> <150928182327.ZM29365@torch.brasslantern.com> <20150929223459.GD2005@tarsus.local2> <560B1F69.3060600@gmail.com> In-Reply-To: <560B1F69.3060600@gmail.com> Comments: In reply to Andrew Janke "Re: Proof of concept: "static" parameter scope" (Sep 29, 7:31pm) X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Proof of concept: "static" parameter scope MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 29, 10:34pm, Daniel Shahaf wrote: } } Bart Schaefer wrote on Mon, Sep 28, 2015 at 18:23:27 -0700: } > Make up a completely new term? "limited" ? "bounded" ? "scoped" ? } } disinherit? Sounds like something you do after the fact, like "export". Which I suppose is a way it could have been implemented -- first declare the local and then impose scoping. That's approximately what happens behind the scenes here anyway. Hmm. "isolate"? On Sep 29, 7:31pm, Andrew Janke wrote: } } I'm a fan of "my". Perl's "my" and "local" are exactly the example I use } when explaining the behavior of zsh "local" variables to new users. This } new scope seems to correspond pretty well to Perl's "my" lexical scoping. I like the concept of "my" but have never been thrilled with the name. } Or maybe "auto"? The C "auto" storage class (the default one, scoped to } a block in a function activation) corresponds pretty well to this Yes but again "auto" refers (as you note) to storage ... all zsh locals are "auto" in that sense. This needs to describe visibility. Really, "local -S" (or some other letter if we're trying to save -S for something) is the ideal thing. The only reason we even need another name is to set up the handler function. Since PWS has voted in favor of "private" I think I'm going to revise the patch in favor of that. There's also no "-P" option of typeset in either bash or ksh, so although I don't like the (dis)similarity with "-p" I think we can go with "local -P" for "private".