- edited description
Simplified function syntax does not always work
I found two problems while playing with the simplified syntax:
-
3 * sin 3
fails (regression since 06/02/2016 release). The compiler considerssin 3
as an implicit multiplication so it compiles3 * sin
first.3 * (sin 3)
works, and3 * sin -3
fails as well obviously. -
3 + sin -3
fails while3 + sin 3
does not. The compiler tries to add3
withsin
as it mistakes-
for the subtraction operator. I'm not sure it has ever worked.
Not sure it is worth fixing that, as there's a workaround (use parenthesis) and I don't see an easy way to do it.
Comments (11)
-
reporter -
For the first: Well, simplified function notation queries the function repo to check if the left operand is indeed a function. Adding this check as an exception to implied multiplication might work ...?
Second: Dunno, don't care ;) It indeed is present in 0.11 already.
-
repo owner Actually, would anyone oppose to removing the simplified function notation? The UI even helps the user by automatically inserting
()
and placing the cursor in between the parens. I've never liked the simplified function notation since it is not that readable (and especially now with the new features), and it adds unncessary complexity to the parser IMO. @polwel @thadrien @fk -
repo owner -
reporter I'm okay to drop them :) Never used them, can't tell if users do.
-
Never used it either. I am afraid quite a few users do though. Then again, with autocompleter it is actually more work not to type the parentheses...
Really won't miss it.
-
I'm on it. I will supress it if it is more simple to suppress it, or correct it if it is more simple to correct it.
-
It was easy to fix so I fixed it. Nevertheless, I HATE this notation. But some users might find it convenient. See pull request #39.
-
- changed status to resolved
-
repo owner - assigned issue to
-
repo owner - changed status to closed
- Log in to comment