-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
language designNeed to make a desion about the design of the languageNeed to make a desion about the design of the language
Description
As currently implemented, conditional expressions must either come alone (i.e. - not interact with any other operator), or surrounded by parenthesis. So, this is legal:
def chain( number : U64 ) -> U64 {
if( numer%2 == 0 ) {
number/2
} else {
number*3 + 1
}
}
And this is also legal:
def chain( number: U64 ) -> U64 {
( if(number>12) {number} else {12} ) + 5
}
But this isn't:
def chain( number: U64 ) -> U64 {
if(number>12) {number} else {12} + 5
}
Currently, this is a limitation of the parser, but we need a debate on whether that's actually a good restriction on conditional expressions.
Metadata
Metadata
Assignees
Labels
language designNeed to make a desion about the design of the languageNeed to make a desion about the design of the language