I find https://github.com/typst/typst/pull/7072#issuecomment-338580... more enlightening about what's going on. Specifically the difference between these three:
1/2(x + y)
1/x(x + y)
1/2^x(x + y)
With a programming language background, that's just odd to reconcile. If 1/2 is treated as a rational integer literal, it's possible to explain the difference between the first two. (And apparently this difference is wildly expected, uncommon as fractions as literals are in programming languages.) But then the last one should turn into (½)ˣ(x+y) because the exponentiation should not slip inside the literal. (I expect the different outcome in the comment is not the result of an algebraic simplification in his case. I really wish they had used 2/3 as the fraction to clarify this.)It seems that TeX users struggled with this at one point, too. That's why LaTeX users generally write $\frac{a}{b}$ instead of $a \over x$. Copious use of braces not rendered in the output certainly avoids precedence issues.
It's also a cultural thing I suppose, as I would personally understand all these expressions having just one as the numerator and the rest below.
It may be related to the fact that "mixed numbers" were never part of my curriculum (Wikipedia¹ says they are more common in non-metric regions). Or it may be just me. In any case, I find this notation ambiguous, so I would not expect a compiler to resolve it correctly.
Edit: also, I would rather write (x + y)/2 if I wanted half the sum, that seems much more logical to me than moving non-integer factors around.
¹ https://en.wikipedia.org/wiki/Fraction#Mixed_numbers
> Edit: also, I would rather write (x + y)/2 if I wanted half the sum, that seems much more logical to me than moving non-integer factors around.
Based on what I recall, there's a bit of an aversion towards writing / or ÷ for division (or explicitly written multiplication). And $\frac{1}{2}(x+y)$ is more readable in inline text than $\frac{x+y}{2}$.
I agree, though I wish you had specified in what context that aversion was.
To give a specific example, I can cite units in the metric system, often written as kg.s⁻².J⁻¹ instead of the more ambiguous kg/s²/J; which could technically be read as kg/(s²/J), giving kg.J.s⁻¹.