[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: select syntax violates the POLA
From: |
Greywolf |
Subject: |
Re: select syntax violates the POLA |
Date: |
Mon, 5 Apr 2021 02:06:01 -0700 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 |
On 4/2/2021 8:21, konsolebox wrote:
That's not a rule but a special compromise. [[ ]] and (( )) are a
form of reserved words themselves just like () and {} as they can be
used multi-line but they aren't allowed to be adjacent to else et al
without a semicolon. [[ ]], (( )), {}, and () are practically just
commands with first-class parsing that consistently have to end with
a semicolon if followed by another reserved word or command.
I'd call it less a compromise than a mechanism; of all listed,
{} represents a block of code in the current shell, () represents
a block of code in a subshell...
but if you want to go down that track, it's kind of interesting to note
that {} on a single line demands a ; before the }, while () prohibits
it. This also seems inconsistent to me, but not at the same level of
egregious brokenness as select.
--*greywolf;
- Re: select syntax violates the POLA, (continued)
- Re: select syntax violates the POLA, Greg Wooledge, 2021/04/01
- Re: select syntax violates the POLA, Chet Ramey, 2021/04/01
- Re: select syntax violates the POLA, Dale R. Worley, 2021/04/01
- Re: select syntax violates the POLA, Robert Elz, 2021/04/01
- Re: select syntax violates the POLA, Andreas Schwab, 2021/04/02
- Re: select syntax violates the POLA, konsolebox, 2021/04/02
- Re: select syntax violates the POLA,
Greywolf <=
- Re: select syntax violates the POLA, Chet Ramey, 2021/04/05
- Re: select syntax violates the POLA, Greywolf, 2021/04/05
- Re: select syntax violates the POLA, Chet Ramey, 2021/04/05
- Re: select syntax violates the POLA, konsolebox, 2021/04/02
- Re: select syntax violates the POLA, Robert Elz, 2021/04/02
- Re: select syntax violates the POLA, konsolebox, 2021/04/05
- Re: select syntax violates the POLA, Greywolf, 2021/04/05
- Re: select syntax violates the POLA, Robert Elz, 2021/04/02
- Re: select syntax violates the POLA, Dale R. Worley, 2021/04/04
- Re: select syntax violates the POLA, Robert Elz, 2021/04/05