|
|
|
|
|
by nicoburns
2015 days ago
|
|
> Of course this just JavaScript being a classical imperative language. Not much to do about that. I think you could actually make JavaScript expression based very easily and completely backwards compatibly. Using a statement in expression position currently throws an error. So you would simply be widening the number of allowable programs. |
|
Object literals, blocks, and ASI take that out of the realm of "very easily":
If `c` is true, does this give you `null` from executing an empty block, or an empty object? If `c` is `false`, do you get an object with key "b" and value whatever `log()` returns, or is that a block with a labeled statement?