Short-circuiting null check operator #2862
Labels
feature
Proposed language feature that solves one or more problems
null-aware-expressions
Issues proposing new expressions to manage null
Currently, instead of doing
We can do
a ?? b
And instead of doing
We can do
However, we can't do this for other expressions, like function calls.
I propose a short-circuiting null check operator, so we can change the previous to this
Or convert this
into
It can also be short-circuiting so in this example if
f()
is null theng
won't be called:The operator itself doesn't have to be double question marks.
The text was updated successfully, but these errors were encountered: