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
{{ message }}
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
Because the existing assignment operators behave like so:
x+=y;x=x+y;x-=y;x=x-y;// and so on
I would expect the proposed operators to behave in a similar way:
a||=b;a=a||b;a&&=b;a=a&&b;a??=b;a=a??b;
I am making no comment on the usefulness of either approach, just that I find the meaning of the operators as proposed to be confusing in light of the behavior of the existing assignment operators.
The text was updated successfully, but these errors were encountered:
#3 deals with this, and we discussed in the latest meeting (see slides 7+).
In particular, this desguaring is over-simplified. (And it whether we run a ?? (a = b) or a = a ?? b is unobservable anyway!) But when it's more complicated, it becomes obvious that += isn't just "copy the left side to the right side". The internal semantics of the operator are different.
Because the existing assignment operators behave like so:
I would expect the proposed operators to behave in a similar way:
I am making no comment on the usefulness of either approach, just that I find the meaning of the operators as proposed to be confusing in light of the behavior of the existing assignment operators.
The text was updated successfully, but these errors were encountered: