We should be allowed to impose boolean logic on the "it" inside when expressions


for instance, this piece of code doesn’t even let the program compile
while it should
(ignore the fact that this code is wrong)

1 Like

You can write "left", "counterclockwise" -> ... to achieve what you want. That’s even fewer characters.

Note that your suggestion for a syntax gets ambiguous if you overload the || operator.


FWIW, you can’t overload any of the boolean operators in Kotlin right now.

1 Like