From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17907 invoked from network); 27 Jun 2001 19:18:23 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jun 2001 19:18:23 -0000 Received: (qmail 834 invoked by alias); 27 Jun 2001 19:17:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15149 Received: (qmail 813 invoked from network); 27 Jun 2001 19:17:32 -0000 Sender: kiddleo Message-ID: <3B3A3177.4BA21665@u.genie.co.uk> Date: Wed, 27 Jun 2001 20:18:15 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: Zsh hackers list Subject: Re: named references References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Peter Stephenson wrote: > I'd certainly like to see this included, along with other stuff from ksh93 > unless it's obviously stupid. The question is when to do it: we have been > planning a neatening up of the parameter setting code, which hasn't got an > interface so much as a backend which happens to include a few functions >>From my perspective, with respect to `when', doing namerefs now allows me to become more familiar with zsh's C code. Were you thinking of doing a parameter rewrite soon? I'd be interested in more detail on the ideas you have for the parameter code. What sort of thing might the interface provide? My main thoughts from what I've seen is that it would be good if it was more flexible so that you could have something like an array of assocations of floats. Maybe allow arrays of things of mixed type? What other types might we want other than something like ksh namespaces (records/structs or whatever you like to call them). > callable from outside. That would probably be a necessary prerequisite for > any attempt at another ksh feature, the ability to tie getting and setting > of parameters to shell functions. Do you mean something like ksh93 discipline functions. If we were to be compatible with ksh93, I think that would also require ksh namespaces (but I'm not sure). Would it be useful if I post a list of ksh93 features not in zsh? Bart Schaefer wrote: > On Jun 27, 5:03pm, Oliver Kiddle wrote: > I think they'd be a very useful addition. Particularly if you can do: > > typeset -A hash > hash[key]=value > nameref 'thing=hash[key]' > > Which, of course, would be easily implemented given my scheme of storing > a pointer to the referenced node in the nameref node. :-) Yes, that would be nice but not necessarily impossible with the string instead of the pointer. I planned to try to get that working after I had the basic ksh level of features working. > You haven't answered any of my questions from 15059, though ... It took me a while to go through it and think about all the options so I did the quick reply to Andrej first. Oliver