Maarten Billemont wrote:

On 08 Apr 2012, at 21:30, Chet Ramey wrote:
On 4/8/12 3:02 PM, Maarten Billemont wrote:

Any particular reason for not removing old undocumented functionality, or is 
that mostly the nature of this beast - dragging along and maintaining ancient 
code for the sake of compatibility?=
Because, as Linda discovered, there is still working code out there using
it.  Maybe we'll get to a point where it's all gone, but we're not there
yet.


IMO, the working code out there that relies on $[...] either runs on older 
versions of bash.

Actually it was a version of 'sh',

Seems like it it's also in 'zsh'. I note.



or if the sysadmin decided to upgrade bash, he can assume the responsibility to 
fix the code.

Might be a good reason to ditch bash and stick with something that supports a syntax that's been around for 20 years.

Like it costs how much? I would **bet** that it cost more code to support (()) than to support [] as arith ops .. so if you want my opinion, lets toss (())...
(like that'll happen)...

[] is 1 token -- (()) is a double token. (()) is much less legible because it is used IN the expressions [] isn't a grouping operator in an arith expression.

Also if you start with $((, that doesn't mean what follows is a arith expression...as in
$(((1)) && echo ok) -- only arith expression is after the 3rd paren.

$(()) for arith expressions is ugly!.... -- since the $ on the outside of (()) changes it meaning visually it is more ambiguous... Why $[] wasn't used makes
no sense -- unless someone did it the other way just to make political waves...
as seems to often be the outlet of frustrated and unimportant people -- if they can make others lives more miserable, then they have created their own importance.

*plegh*...




Reply via email to