3 ms·
"Some languages have a "null-coalescing" operator you can use in these cases but its a niche thing." I see that not as niche, but as a fairly recent invention,
by Someone 11y ago
"Some languages have a "null-coalescing" operator you can use in these cases but its a niche thing."
I see that not as niche, but as a fairly recent invention, or at least one that recently is becoming popular. IMO, C#'s ?? is superior to reusing binary operators.
Advantages are that it looks more like the ternary operator, and that it doesn't require adding implicit conversions to boolean to your language.