jashkenas/coffee-script — Issue #1933: Shorter version of if-then-else
Author: jussiry
Created: 2011-12-13 20:31:15+00:00
State: open

I love the literate way of CoffeeScript but writing ìf ... then ... else ...` can be too long to write in one liners (compare to `... ? ... : ...`in Javascript).

So how about allowing also the following syntax:

`time_to_sleep = true if clock > 12 else false`

This way we could retain the literate way of writing code and at the same time make code more compact by dropping the word 'then'.