Closed
Description
The current reference syntax of IfExpression is not clear enough:
I had to read more on explanation that:
The form of an if expression is a condition expression, followed by a consequent block, any number of else if conditions and blocks, and an optional trailing else block
So I think introduce a condition expression in syntax might make sense.
Prior art in other languages:
- C++
if
syntax has condition expression: https://en.cppreference.com/w/cpp/language/if - Swift: https://docs.swift.org/swift-book/ReferenceManual/Statements.html#grammar_if-statement
Metadata
Metadata
Assignees
Labels
No labels