You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The more verbose syntax is actually a == null ? b : a or equivalently a != null ? a : b. Personally I don't see an obvious expansion of a ?: b to either of those.
One other syntax to consider would be a else b. But ?? is more similar to ?..
If you look around, this same operator is spelled either ?? or ?: in a bunch of different languages. I don't think either one has a big majority. C# and Swift use ??, PHP and Groovy use ?:.
Personally, I prefer ??, in particular because it ties in nicely with Sean's suggestion about compound assignment in #6.
looks more descriptive to me than
to me, because it contains both characters of the more verbose syntax
The text was updated successfully, but these errors were encountered: