From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1734 invoked from network); 2 Jul 2001 09:32:32 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jul 2001 09:32:32 -0000 Received: (qmail 28723 invoked by alias); 2 Jul 2001 09:31:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15203 Received: (qmail 28711 invoked from network); 2 Jul 2001 09:31:33 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: named references In-reply-to: ""Bart Schaefer""'s message of "Sat, 30 Jun 2001 00:56:20 PDT." <010630005621.ZM20243@candle.brasslantern.com> Date: Mon, 02 Jul 2001 10:31:12 +0100 From: Peter Stephenson "Bart Schaefer" wrote: > On Jun 28, 10:39am, Peter Stephenson wrote: > > Subject: Re: named references > > > > I'd be very tempted just to store the name of the object referred to, > > after a bit of sanity checking, and dereference it right at the last > > minute as if with ${(P)...} > > The problem with the "at the last minute" approach is that there are a > lot more places where namerefs have to expose the underlying parameter > than just in the parameter substitution code. If the dereference takes > place too late, it has to be dealt with in multiple places: assignment, > `unset', substitution, etc. That's why I mentioned rewriting the parameter code. The same thing comes up with ksh `discipline' functions, whose name I couldn't remember. It should be possible to intercept gets and sets in this way, even recursively. This is certainly not easy with the current code. If it's substantially easier to do it the other way for now that's fine. But I suspect we (for suitably arbitrary and not necessarily inclusive `we') might end up rewriting it anyway. -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************