Comment

Comment by crooked-v

And in Javascript, once do-expressions go from a proposal to a common part of the language, this will be a thing:

  let value = do {if (boolean) { this_value } else { other_value }}
...which is even closer to the Elixir style than JS's ternary operator (which is identical to Java's).
parent crooked-v 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton