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

Re: zsh -n does not detect incorrect associative array declaration



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



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