Op 02-09-2024 om 21:30 schreef Steffen Nurpmeso via austin-group-l at The Open Group:
Austin Group Bug Tracker via austin-group-l at The Open Group wrote in
  <[email protected]>:
  |for e in 3 '"$@"' \
  | 5 '"$@$@"' \
  | 7 '"$@$@$@"' \
  | 9 '"$@$@$@$@"' \
  | 11 '"$@$@$@$@$@"' \
  | 13 '"$@$@$@$@$@$@"' \

This is no joke actually, i find it amazing *how* often software
fails on "deeper recursion" of a thing.

In ksh, this bug has nothing to do with recursion, it's due to faulty quotes reduction. (It's now been fixed for the next release.)

At times you even get answers like "we already do more than
required", but noone understands why "+10++11" is a correctly
handled case, whereas "+10++VAR" is not, and if you generate

In ksh, this is an error:

$ echo $((+10++11))
-ksh: +10++11: assignment requires lvalue

Does POSIX require this to work? ksh is finding an incorrect use of the ++ increment prefix operator. Correct is:

$ echo $((+10+ +11))
21

POSIX's lack of support for pre- and postfix ++ and -- operators in shell arithmetic is a random and annoying omission that causes unnecessary incompatibilities, even when they are never used.

[...]
(And in hindsight to the software programmer "scene" in its
current state i am thinking that rewriting in Rust will solve the
issues ...)
I doubt that, as none of this has anything to do with memory safety. Generally incorrect behaviour can be programmed in any language.

- Martijn

  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Steffen Nurpmeso via austin-group-l at The Open Group
      • Re:... Harald van Dijk via austin-group-l at The Open Group
        • ... Steffen Nurpmeso via austin-group-l at The Open Group
          • ... Harald van Dijk via austin-group-l at The Open Group
            • ... Steffen Nurpmeso via austin-group-l at The Open Group
  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Steffen Nurpmeso via austin-group-l at The Open Group
      • Re:... Martijn Dekker via austin-group-l at The Open Group
        • ... Steffen Nurpmeso via austin-group-l at The Open Group
        • ... Harald van Dijk via austin-group-l at The Open Group
          • ... Steffen Nurpmeso via austin-group-l at The Open Group
            • ... Steffen Nurpmeso via austin-group-l at The Open Group
  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Geoff Clare via austin-group-l at The Open Group
    • Re: [10... Harald van Dijk via austin-group-l at The Open Group
      • Re:... Geoff Clare via austin-group-l at The Open Group
  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to