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-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version;
        bh=2qabToYwynrAnyQf/RWQkFgxoaU70OG+eBqhPHX+7mU=;
        b=kBEAIlqhZXsaARd2eBdYeu9ov3PllMv5Cyw10sQe3Bz0YCyVQ6Inl3Nv9yxRSB981V
         gPmo5b/Ff/aGXppqZqDQUl9hWd5IbPVe1msAlLwjxf+y5aqMQWQ6369bEWawZkWIlUhr
         wPZtJzWPB2qwu3FvPrZO08tgipawsHMIXCQjYgWteG4A9X2OfhSWFSrixXtpVP9vuzac
         peA+9vfhIXPjaeoGwj814cL6Lt3WdvFU1hvdLK7qeT78RYrjwIfTb8esfz4lylyRCscb
         jDDGX3WyRd2YymudNArpI2UafrRVbDdPtHwoBveEc/cI4LTEvJm/SN1KXI8y2pw5jNgN
         q8nA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version;
        bh=2qabToYwynrAnyQf/RWQkFgxoaU70OG+eBqhPHX+7mU=;
        b=le8UojYe+KtGYHodMSjNBRtBIXjof7d9JWm0s4vEj/8eV6DaeuYGFEzQhPoj9PL7GB
         xH62UnYPWJK65ROE/6FAkYTCpld3oYz9x6ymfbUEW2577pqV4IECuLJAQ35llj+iZAr2
         PIjdyQn8ZQg1D4rhaeIkKa+XnPqWSIZx54t9i7E0YWMBw7c4RZgdWzDrDj2OCVO8LRo5
         Jj9KA8DeAtAXl/Zzuvy30nnKPRlNYdZ2N5+b18F9PUf5TxQMNLpG++JmQMnE1wu3TU/b
         e1Z1Pyb37A5UReN51XxN7rxHYIVprvCFImYv7E8lrSmu6GeqvAZYmYfw56gYZOMJNYlq
         pPLg==
X-Gm-Message-State: AD7BkJKrML9ywJ9XmenuXGgtU4GdPzx2bm2/eIstWPcR1sCU9baNWDhxMHkv/FbZ7l6l1A==
X-Received: by 10.66.193.131 with SMTP id ho3mr14281990pac.154.1458839534822;
        Thu, 24 Mar 2016 10:12:14 -0700 (PDT)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160324101250.ZM5217@torch.brasslantern.com>
Date: Thu, 24 Mar 2016 10:12:50 -0700
In-Reply-To: <20160324094655.17420dac@pwslap01u.europe.root.pri>
Comments: In reply to Peter Stephenson <p.stephenson@samsung.com>
        "Re: zsh -n does not detect incorrect associative array declaration" (Mar 24,  9:46am)
References: <56F1C3D7.6020800@redhat.com> 
	<CAH+w=7YDbbw_J2G6BJKqi9=MtymqAQo1Zhv-19FGK0RqFnyScA@mail.gmail.com> 
	<56F1FF5F.6060907@redhat.com> 
	<CAH+w=7bkphoEdbFzXbU4_UXNWjr8M1UMUuO0QAiOfh=QR--1Ww@mail.gmail.com> 
	<20160323092338.492731f9@pwslap01u.europe.root.pri> 
	<160323190830.ZM2502@torch.brasslantern.com> 
	<20160324094655.17420dac@pwslap01u.europe.root.pri>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: zsh -n does not detect incorrect associative array declaration
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 38215

On Mar 24,  9:46am, Peter Stephenson wrote:
} Subject: Re: zsh -n does not detect incorrect associative array declaratio
}
} On Wed, 23 Mar 2016 19:08:30 -0700
} Bart Schaefer <schaefer@brasslantern.com> wrote:
} > Bash allows you to set numerically-indexed positions in a normal array
} > with the ( [key]=value ) syntax, and also outputs the arrays that way
} > with "typeset -p".  You can have sparse arrays in bash.
} 
} We probably need to decide which to support at some point.

It would be a pretty major rewrite to support sparse arrays, we do all
sorts of things based on the idea that a zsh array is basically the
same as an argv in C.  (Bash, I believe, uses linked lists.)

Of course to be "traditional" about it, we'd do it the ksh way when
KSH_ARRAYS and the bash way when ... something else.

