>
> > also this variant does the same:
> > $ (('ar[$idbad2]+=11'))


> Because (( and let are essentially equivalent.


I think the more important question isn't "why does (( behave this way?",
but rather "should (( behave this way?".

It's probably not reasonable to expect the author to know and take into
account that (( arr[$key] )) treats key's data as bash code.  Really, the
behaviour of ((' arr[$key] ')) makes more sense as a default behaviour.
The former is broken (as the expectation that $key expands data is not met).

Reply via email to