From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13102 invoked by alias); 29 Apr 2015 13:46:12 -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: 34996 Received: (qmail 13271 invoked from network); 29 Apr 2015 13:46:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Message-ID: <5540E098.5070509@inlv.org> Date: Wed, 29 Apr 2015 15:46:00 +0200 From: Martijn Dekker User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Re: [BUG] Can't mark unset variables as read-only References: <55407BBF.6020401@inlv.org> <20150429113602.374240c7@pwslap01u.europe.root.pri> In-Reply-To: <20150429113602.374240c7@pwslap01u.europe.root.pri> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Peter Stephenson schreef op 29-04-15 om 12:36: > As you can imagine, > something like this that completely breaks the normal programming model > of variables (a variable can't have state if it's unset because it > doesn't exist) is a nightmare to implement; FWIW, I imagine a simpler way might be, rather than implementing read-only as an attribute of variables themselves, to keep a separate table of variable names marked as read-only which is checked against upon variable assignment. I know absolutely nothing about the zsh codebase, so feel free to laugh at my suggestion. My interest is in getting the most out of cross-platform shell programming, and I'm really only here to report a bug. Many thanks for the patch. I'll apply it, test it, and report back. (Also, my apologies for the initial duplicate. I thought it hadn't gone through the first time.) - Martijn