This is purely syntactic sugar for select_first([x]) where x is a value that may be None.
Int? x = 5
Int x1 = x?
Int? y = None
Int y1 = y? # error
If we add this operator then we can get away from special-casing optional behavior within string interpolations. I.e. "~{x + y}" would no longer be allowed (i.e. deprecated in 1.2 and disallowed in 2.0) and instead you'd have to write "~{x? + y?}", just as you would in an expression outside of an interpolation.
This is purely syntactic sugar for
select_first([x])wherexis a value that may beNone.If we add this operator then we can get away from special-casing optional behavior within string interpolations. I.e.
"~{x + y}"would no longer be allowed (i.e. deprecated in 1.2 and disallowed in 2.0) and instead you'd have to write"~{x? + y?}", just as you would in an expression outside of an interpolation.