4 ms·
This doesn't duplicate anything in the language; it moves a stdlib macro to be included in the core language. Since if is an expression, ternay operators would
by steveklabnik 10y ago
This doesn't duplicate anything in the language; it moves a stdlib macro to be included in the core language.
Since if is an expression, ternay operators would be wholly redundant.
- QuantumLogic 10y agoThe whole point of it would be to have a higher level of abstraction which makes codebases more concise. Avoiding duplication for the sake of avoiding it is as nonsensical as avoiding 100 dollar bills since we already have 100 single dollar bills that could make it up.
- masklinn 10y ago> The whole point of it would be to have a higher level of abstraction What are you talking about? A ternary isn't a higher level of abstraction, it's at best the exact same thing with a different syntax, at worst it's a more limited version of the same.