Comment

Comment by munificent

> very easily and completely backwards compatibly.

Object literals, blocks, and ASI take that out of the realm of "very easily":

   var x = if (c) {} else { b: console.log("hi") }
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?
parent munificent 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton