Wouldn't it make sense to do the number operations first then combine their string representations with the strings?
If that's the only type of compound expression anyone ever writes which mixes string operations with numeric operations, perhaps. Unfortunately, it's not. Thus the possibilities are 1) to add even more precedence levels to add special cases things like the repetition operator, 2) to require disambiguating parentheses where the default precedence levels are wrong for special cases like this, or 3) to enforce a strict left to right evaluation order.
I would say that humans tend to group like with like and that a well designed parser would follow that premise over one that makes humans wrong.
You're poisoning the well.
In reply to Re^9: Precedence design question...'x' & arith
by chromatic
in thread Precedence design question...'x' & arith
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |