From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4302 invoked from network); 11 Sep 2006 13:49:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Sep 2006 13:49:20 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 84437 invoked from network); 11 Sep 2006 13:49:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Sep 2006 13:49:14 -0000 Received: (qmail 22536 invoked by alias); 11 Sep 2006 13:49:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22687 Received: (qmail 22526 invoked from network); 11 Sep 2006 13:49:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Sep 2006 13:49:11 -0000 Received: (qmail 84143 invoked from network); 11 Sep 2006 13:49:11 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 11 Sep 2006 13:49:10 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly01d.srv.mailcontrol.com (MailControl) with ESMTP id k8BDlmlJ006726 for ; Mon, 11 Sep 2006 14:48:53 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 11 Sep 2006 14:45:14 +0100 Date: Mon, 11 Sep 2006 14:45:06 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: typeset -T versus typeset -r, bug or feature? Message-Id: <20060911144506.57da4d89.pws@csr.com> In-Reply-To: <060905202415.ZM11437@torch.brasslantern.com> References: <060905202415.ZM11437@torch.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.6.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Sep 2006 13:45:14.0935 (UTC) FILETIME=[829F7C70:01C6D5A8] X-Scanned-By: MailControl A-07-04-01 (www.mailcontrol.com) on 10.68.0.111 Bart Schaefer wrote: > Do this in an interactive shell so that the third line doesn't cause the > shell to exit: > > typeset -T READ write > typeset -r READ > READ=wrong zsh: read-only variable: READ > write=right > print $READ right This is a feature. The parameters are different interfaces to the same information. "typeset -r write" will work as expected. This is inevitable given the current model for internal parameter storage. I'm not particularly attached to the current system anyway; parameters are probably the clunkiest remaining parts of the system, full of ad-hoc tests, over-complicated but under-powerful interfaces, and accesses into the system at all sorts of different levels that ought to be implementation details. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php