Language feature request : IF Statement

In the if statement the current syntax is: if groupedExpression ifBody
i.e
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

i.e
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.

2 Likes

Also would probably create ambiguous expressions to parse

2 Likes

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