[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arithmetic expression: evaluation order bug
From: |
Greg Wooledge |
Subject: |
Re: Arithmetic expression: evaluation order bug |
Date: |
Thu, 29 Dec 2022 18:45:48 -0500 |
On Fri, Dec 30, 2022 at 12:21:52AM +0100, Steffen Nurpmeso wrote:
> ..i want to reiterate the relation to what "human logic" expects.
I'm a human, so I feel qualified to address this point.
What I expect from a command like
(( i += j += i += j ))
is to get unpredictable results that have no relationship to anything
useful, because that code is complete rubbish.
I can't even guess what the *intent* of the code is.
I'm not optimistic enough to expect an error message, or even better,
an immediate termination of the shell. That would be *far* too useful
(because it would force the script's author to rewrite that code).
- Re: Arithmetic expression: evaluation order bug, (continued)
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Alain D D Williams, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Andreas Schwab, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Andreas Schwab, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Andreas Schwab, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/29
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/29
- Re: Arithmetic expression: evaluation order bug,
Greg Wooledge <=
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/30
- Re: Arithmetic expression: evaluation order bug, Alain D D Williams, 2022/12/30
- Re: Arithmetic expression: evaluation order bug, Robert Elz, 2022/12/30
- Re: Arithmetic expression: evaluation order bug, Steffen Nurpmeso, 2022/12/30
- Re: Arithmetic expression: evaluation order bug, Robert Elz, 2022/12/30