'when' to denote absense of else-branch is a bad solution to an imaginary problem

As much as if is a nice way to express that there is no side effect.
And all the same arguments can be made for that.

Historically, so many people complained about not seeing else branches that didn’t exist, because of if, that one day Rich Hickey decided to introduce when. Not.

when always served the purpose of implicit do in LISP, and it was even idiomatic to ignore its return value. Intended for side-effects - hence expansion with do in it.

If you really need single branch if, push for if1 in core, a single branch if without do.

1 Like