bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intriguing error with arithmetic evaluation


From: Chet Ramey
Subject: Re: Intriguing error with arithmetic evaluation
Date: Tue, 16 Aug 2016 14:58:53 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 8/16/16 12:16 PM, L. A. Walsh wrote:

>>>> The relevant change was probably the change in the set of commands to
>>>> which `set -e' applies.  The change was the result of Posix changing
>>>> the semantics of the errexit option and expanding its scope from simple
>>>> commands to all commands.
>>>>       
>>> That doesn't explain why those not using posix mode should suffer the
>>> arbitrary added incompatibility with previous code.
>>>
>>> POSIX was meant to describe existing code -- not cause incompatibilities
>>> with old or current code.
>>>
>>> POSIX disbanded and the name has changed hands to be run by people
>>> unassociated with the original POSIX charter -- who created a different
>>> charter.
>>>     
>>
>> Very little in this message is accurate.
>> Your conspiracy-theory game is still strong, though.
>>   
> 
> If that's the case, then "what" are you claiming is the conspiracy which
> I am "proposing"?

The idea that Posix was once pure and forthright, and has subsequently
become taken over by others and corrupted.  This is the same group with
the same charter.  Some people have moved in and out, as is to be
expected, over time, but the group's purpose has remained consistent.

There are places where Posix, when faced with incompatible
implementations, has invented functionality (e.g., `command'), but that
happened from the beginning. `command', for instance, is in the first
published version of the shell and tools standard, from 1992.


> 
> I see no conspiracy.  Only an evolution of what was, to what is,
> with the main difference being that the original charter said POSIX
> was to be _descriptive_, whereas the new POSIX is being prescriptive --
> no longer describing what exists so people can be compatible, which had
> been the original intent.  Those fact are indisputable  to anyone looking
> at the original charter and current behavior.

You keep saying this, as if you expect it to become true if you repeat it
enough times.

> 
> Perhaps you can explain why bash's "normal mode" had to change?

Bash is at its base a Posix shell implementation.  There was no reason to
be incompatible with Posix and historical (and other contemporary) shell
implementations.  In addition, it made `make' and other code that
expected historical behavior from `set -e' fail in unexpected ways.

Don't make the mistake -- again -- of thinking that because you didn't
have a problem with it, nobody did.  I got plenty of strongly worded
messages about the old bash behavior, e.g.:

"as a bash user I fault you for
implementing some insane behavior instead of questioning the standard."


> Anyone who has had a problem with how "-e" works has done so due
> to that change.  If bash had remained compatible in non-POSIX mode,
> the issue for bash would not be present.

Compatible with what?  It wasn't compatible with historical or other
contemporary shell implementations.  The Posix WG acknowledged a defect
in the standard, an incompatibility with historical and current shell
implementations, and corrected it; and bash changed to match the
standard.  When the standard changed from saying "simple command" to
"command", that includes all commands.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]