Language feature request : IF Statement


In the if statement the current syntax is: if groupedExpression ifBody
if(a || b){}

I am suggesting we have all kinds of expressions there i.e
if expression ifBody
thus we give room for
if a { // do something }
if a || b { // do something}

This can also be used for if… else if… sections

if a == b {} else if a <=b {//do something}


You can already leave out the curly brackets. Being able to also leave out the brackets around the condition creates too many possible formatings and will look confusing.

1 Like

Also would probably create ambiguous expressions to parse

1 Like

Yea I realized that as expression parser would not have a end indicator.