4 ms·
100% agree, it just an unfortunate interaction between 1) ?: syntax 2) [] for dereferencing 3) [] for literals 4) ? for null chaining Each of the decisions is
by moomin 7y ago
100% agree, it just an unfortunate interaction between
1) ?: syntax
2) [] for dereferencing
3) [] for literals
4) ? for null chaining
Each of the decisions is correct in isolation, but together they’re a nightmare. Which decision you made first determines what you end up with in the other areas.
- munificent 7y agoExactly right. If I had a time machine, (1) is what I'd fix. The conditional operator syntax has always been pretty hokey and if you just make `if` an expression (along with most other statement forms), you have no need for it.