Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: named references



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



Messages sorted by: Reverse Date, Date, Thread, Author