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

  • [1003.1(2008... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Scott Lurndal via austin-group-l at The Open Group
      • Re:... Roger Marquis via austin-group-l at The Open Group
        • ... Tapani Tarvainen via austin-group-l at The Open Group
        • ... Scott Lurndal via austin-group-l at The Open Group
          • ... Stephane Chazelas via austin-group-l at The Open Group
      • Re:... Stephane Chazelas via austin-group-l at The Open Group
      • Re:... Robert Elz via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to