Brace-free syntax for conditional statements

Under the new, brace-free syntax, what is the rationale for the keyword “then” in an if statement? Isn’t it cleaner to use the semicolumn such as in a class definition to avoid having multiple different end of line markers? For instance:

if something:

Same question for loops (eg while do).


You want to use the same syntax for in-line expressions, but if A: B would look like a type ascription, when put on the same line.


Personally, I hope they allow then-free and do-free, as I commented there, but there are competing opinions.

The linked ticket says indentation won’t save us.

I didn’t follow the saga of colon for template definition.

Colon gets varying degrees of support. I would have expected more people to complain about requiring space between operator chars.

object :+ :

1 Like