On 3/28/21 12:25 AM, Oğuz wrote:

Why? I think it's better this way.


--
Oğuz


1) For consistency sake with the shell the idea was borrowed from mostly.
2) Prior to this extension bash required specifying the key and value for
AA assignments, so it seems weird to silently ignore that a value wasn't given 
now.
2.5) I subjectively think passing an odd number of elements to declare is more 
often
than not to be a mistake that the user would be interested in knowing about.

With the way it is now, you could save a few characters to do a seen array.
$ while read -r key; ... seen+=("$key") ...
but not really much else.

Reply via email to