Comment

Comment by alpaca128

> just to make the whole "you don't need to say return in the last statement" look clever.

I sure prefer `let x = if foo { 0 } else { 1 };` over `let x = if foo { return 0; } else { return 1; };`. Which raises another potential dilemma: do you break consistency and allow returning values without `return` in if-blocks, or do you make it impossible to return from a function early within them, instead making the returns exit the if-expression early for ultimate confusion?

No, please don't take away my semicolons unless you provide an actual alternative, even if it's just a Lisp-like flood of parentheses.

parent alpaca128 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton