Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Go 1.18. Parent comment
I disagree:
- The variable name is repeated three times, increasing visual clutter and the chance of typos.
- The variable can't declared immutable. In Java/JS/Dart/etc it's nice to know that after "const x = foo ? bar : baz", x won't change.
And you don't even have to add a new operator, Rust and Kotlin get these benefits with an expression form of if/else.
There are no comments on this comment yet.
I disagree:
- The variable name is repeated three times, increasing visual clutter and the chance of typos.
- The variable can't declared immutable. In Java/JS/Dart/etc it's nice to know that after "const x = foo ? bar : baz", x won't change.
And you don't even have to add a new operator, Rust and Kotlin get these benefits with an expression form of if/else.