Language feature request : IF Statement

#1

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}

#2

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
#3

Also would probably create ambiguous expressions to parse

1 Like
#4

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