Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The ternary operator exists as shorthand for if()/else. It would be nice if there were an equivalent operator for just if().
Ternary operator:
if (a) b else c => a ? b : c
Binary operator:
if (a) b => a ? b