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

Re: Associative arrays, structured namespaces



Bruce Stephens wrote:
>This strikes me as an excellent idea.  Presumably the implementation
>is similar to that of associative arrays, though?  

No.  The way it's done in Elate, the shell just treats the structured
variable name as an opaque string.  It's only convention that interprets
the name as having structure.  Associative arrays is a completely
separate issue.

>What's then needed is some way of tying these names to other names, so
>that PATH connects correctly to shell.path and so on.

That's relatively easy.  We already have some support for linked
parameters.

>                                                       This would be a
>good opportunity to generalise things a bit, and allow arbitrary shell
>functions to be called when a variable gets set or read, and stuff
>like that.

I'd like to do that too.

-zefram



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