zsh-workers
 help / color / mirror / code / Atom feed
From: Bruce Stephens <b.stephens@isode.com>
To: zsh-workers@math.gatech.edu
Subject: Re: Associative arrays, structured namespaces
Date: 10 Jun 1998 13:07:29 +0100	[thread overview]
Message-ID: <vbpvghxxxa.fsf@snake.isode.com> (raw)
In-Reply-To: Zefram's message of "Wed, 10 Jun 1998 11:44:51 +0100 (BST)"

Zefram <zefram@tao.co.uk> writes:

> 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.

Yes, I wasn't thinking clearly.  I was thinking that adding a SET
function to shell.path (which would be called shell.SET, I suppose)
and all that kind of functionality would be harder without regarding
things as separate associated arrays, but I'm clearly wrong: it's
still dead easy with a single namespace, because you know exactly what
you're looking for.

Supposing zsh has a hash table of parameter names which pointed at
values; couldn't the hash just be replaced by a btree or something?
Wouldn't that provide enough to reasonably efficiently produce all
variables beginning with some prefix?  

Probably you're right, though: associative arrays ought to be done
specially, if they're done at all.  Come to think of it, having an
associative array very_long_prefix.put_keys_next.* would probably be
too expensive done as a set of variables.  Yeah, you're definitely
right: keep things simple.


  reply	other threads:[~1998-06-10 12:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-09 17:09 User-defined zle widgets and built-in widget failure Bart Schaefer
1998-06-09 18:01 ` Zefram
1998-06-09 19:12   ` Bart Schaefer
1998-06-09 20:02     ` Zefram
1998-06-10  6:26       ` Variable namespaces, goals for ZLE, etc Bart Schaefer
1998-06-10 10:55         ` Zefram
1998-06-10 17:37           ` Bart Schaefer
1998-06-10 18:01             ` Zefram
1998-06-10 18:36               ` Bart Schaefer
1998-06-10 10:24       ` Associative arrays, structured namespaces Bruce Stephens
1998-06-10 10:44         ` Zefram
1998-06-10 12:07           ` Bruce Stephens [this message]
1998-06-10 12:28             ` Bruce Stephens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vbpvghxxxa.fsf@snake.isode.com \
    --to=b.stephens@isode.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).