Closed seaneagan closed 9 years ago
All other compound assignment operators simply add = to the operator:
=
a += b ==> a = a + b a >>= b ==> a = a >> b
a += b
a = a + b
a >>= b
a = a >> b
It would be more consistent and obvious if ?= were instead ??=:
?=
??=
a ??= b ==> a = a ?? b
a ??= b
a = a ?? b
:+1:
Sounds good to me. To be explicit:
x = x + y => x += y
x = x??y => x ??= y
Done.
All other compound assignment operators simply add
=
to the operator:a += b
==>a = a + b
a >>= b
==>a = a >> b
It would be more consistent and obvious if
?=
were instead??=
:a ??= b
==>a = a ?? b