Open saivan opened 4 years ago
I struggle with this one. Right now f and g are designated as functions. I half wonder whether it'd make sense to make all single-letter characters followed by parens behave like functions.
But then we'd run into problems, like if p was treated as a function, then sqrtp(p+1) would get rendered as sqrt(p(p+1)), which might not be what was intended...
Another expression that shouldn't be interpreted as function application is x(x+1)
.
If there ever was a breaking "version 2" syntax, you could require a space between an opening parenthesis and its preceding letter to avoid it becoming a function. Similarly, I am inclined to add spaces between variables being multiplied (and for clarity, also print them with a tiny space between - because often it is useful to use variable names longer than one character, as in programming). But surely there are differing opinions on that...
I think probability should be considered a function, at the moment we render:
P(X)/6
as:
Which might not be ideal?