I agree with Stephen that the Elvis operator should have been included.

Regardless, I think the proposed method is still a common idiom worth
having. It might not "save any keystrokes", but it's a certain way of
not flubbing ternary logic or a verbose if-else statement.

By the way, this is a lot easier than writing out the native logic check:
defaultIfNull(a, defaultIfNull(b, c));

Paul

Reply via email to