On Sun, Oct 30, 2022 at 02:06:48PM -0700, Roger Marquis via austin-group-l at The Open Group wrote: > >Now i read stephane's "MO, [[...]] has no benefit other than cosmetic over > >[" (#5973) > > No benefit is key, but the cost is also an issue, cost in terms of > compatibility.
Historically, '[[' was implemented directly by the shell, while '[' was implemented using fork(), exec("["). There is clearly a benefit to eliminating process creation. > >To my surprise i found yesterday that [[..]] is quite ambiguous, whereas i > >thought it is not: > > It is ambiguous as well as overly terse, poorly readable, duplicative > and unnecessarily overloaded due to the era this token was written and > the codebase it is modeled on i.e, Perl. Perl has been declining in > popularity for a couple of decades now. The main reason is readability. > Why is Posix considering this failed syntax model? As perl came several years after the first release of David's shell, I'm not sure that you can claim correctly that the [[ feature was modeled on Perl. scott