2 ms·
Sometimes the logic in at least one of the arms of the if/else is sufficiently complicated to make it worthwhile (e.g. cases where you find yourself needing a '
by mst 5y ago
Sometimes the logic in at least one of the arms of the if/else is sufficiently complicated to make it worthwhile (e.g. cases where you find yourself needing a 'do' block inside a ternary).
Also doing that with if/elsif/elsif/else is often far more readable than nested/chained ternaries.