Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from mail-wm0-f52.google.com by f.primenet.com.au (envelope-from <stephane.chazelas@gmail.com>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(74.125.82.52):SA:0(0.0/5.0):. 
 Processed in 0.109191 secs); 23 Aug 2016 15:54:27 -0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS,
	T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: stephane.chazelas@gmail.com
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 74.125.82.52 as permitted sender)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:subject:message-id:mail-followup-to:references
         :mime-version:content-disposition:content-transfer-encoding
         :in-reply-to:user-agent;
        bh=n1X7lMV3U8Lsvr3SfGusbiL8I4J6z/CXc7Unp+RnCrc=;
        b=Liuo21ns53J+vP50rkjySXO9CQ7E+2nkiOoYBxPALBlkHYirFqA8sW1pFDG2C3ukhq
         rNdd4j/BLenEhhmEERsbPWUjzcobkkhzBshI/eipJmffL8a1sA6yVpcnStEW//DcBxW9
         PdHwIVqV8FFaRz6upRgoOhcMb53sJU/sQt06VyGyogqI7gLtfU9+/Gp+Qob3Wt9rck5P
         40fyuj+2qLGDK6Pv+ICysJvUm6uX4irOLtXLUTAu6avJwCk8I/KSCLlQcTHySa6ilr3L
         xYF5Slw4bb3VnKrhLt0N6hixXYvJENUtBs6hndsFnNJdLHiQNJUxfR34gS0Q7ba886B9
         DHDw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:subject:message-id
         :mail-followup-to:references:mime-version:content-disposition
         :content-transfer-encoding:in-reply-to:user-agent;
        bh=n1X7lMV3U8Lsvr3SfGusbiL8I4J6z/CXc7Unp+RnCrc=;
        b=QERbl+PrZUIDUR1xu24virghVw9qRe+GuBm/6W9mbvYegmcL9rfis4c7d/Fd2Jhftc
         AskS0gsjPyhYWn+2TU0/zFMhL5/VBKtz4qNxCVTcsXrfT1tOtkWp9XMCEcvAGR2PfOnU
         Nrqru4QXq4wEaOSyWVyxTdLsxPOcKLV5zyPYfEiyEIu1nwJZ6mrZo8G4H0whnUMIYTjn
         IPS8VoDvAiODRzfbaqlcyY/hPgqrgW5sBq7bTzEdiSfqogT+EACmzGDwy/i22USdY8R2
         pjCMhdLF4h0BWAPdXsgFfqS1nY5jqUTZfN5K2Uy9QdVg8X/ThDRJcUjT+b7aBwlnWUFL
         +/vw==
X-Gm-Message-State: AEkoouunSri2tG/xIwt2HtJ/+Y3kFBmSlsEeMOUJ38sBradBjvyrCx/6qd8dKIg3oZ7Lfg==
X-Received: by 10.194.116.1 with SMTP id js1mr25098638wjb.183.1471967658654;
        Tue, 23 Aug 2016 08:54:18 -0700 (PDT)
Date: Tue, 23 Aug 2016 16:54:16 +0100
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Lawrence =?iso-8859-1?Q?Vel=E1zquez?= <vq@larryv.me>
Cc: acs@alumni.princeton.edu, ethersoft@gmail.com, zsh-workers@zsh.org
Subject: Re: Help with associative arrays
Message-ID: <20160823155416.GA9825@chaz.gmail.com>
Mail-Followup-To: Lawrence =?iso-8859-1?Q?Vel=E1zquez?= <vq@larryv.me>,
	acs@alumni.princeton.edu, ethersoft@gmail.com, zsh-workers@zsh.org
References: <CACeGjnUfMEo5KtdMn=iiAVsfAJgjeVyk7vh+WFZgcyKeahBbnQ@mail.gmail.com>
 <2D3937A2-41B0-4B31-90D9-3C91D0DFFB92@larryv.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <2D3937A2-41B0-4B31-90D9-3C91D0DFFB92@larryv.me>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Seq: zsh-workers 39091

2016-08-21 17:18:11 -0400, Lawrence Velázquez:
[...]
>         The second difference is that a double-quote (`"') may appear as
>         part of a subscript expression without being preceded by
>         a backslash....
[...]

An annoying consequence is that (contrary to with ksh93) you can't do:

a[""]=foo

To assign an element for the empty key. You have to do things
like:

a[${}]=foo

or

a+=('' foo)

instead.

It would be nice if one could do:

a[]=foo

(which currently returns an error)

Note that it's a lot worse in bash. bash associative arrays
can't have an element with an empty key!

-- 
Stephane

