You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should forbid a == 0 ? a == 1 ? a : a : a as it's done now, because this syntax is really hard to read, so we want to be JS-like but not allow everything if it hurts readability. For instance, a / 2 / b should also be forbidden if there are not parentheses.
To do that, we might introduce a separate linter-like pass into the compiler.
There are might be many other cases, so we should turn to existing academic research on common mistakes people make because of confusing syntax and draw from industrial best practices.
Are you using the latest released (or pre-released, a.k.a. "next") version?
Tact source code
Relevant Tact/build system log output
What happened?
Grammar disallows nesting conditionals through second argument
What did you expect?
Grammar allows nesting conditionals through second argument, as in pretty much any other C-like language
Steps to reproduce
No response
How do you run Tact?
Other
Anything else?
No response
The text was updated successfully, but these errors were encountered: