-
Notifications
You must be signed in to change notification settings - Fork 5k
[API Proposal]: New user-defined operator names #114930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tagging subscribers to this area: @dotnet/area-meta |
Looks good as proposed There was discussion about "Assignment" vs some other token ("Self"?) for the instance increment/decrement, but we stuck with the proposed "Assignment" in the end.
|
Just curious, is there a need for |
Not for this feature. And I think this name already got reserved when we were adding support for checked user-defined operators. |
Background and motivation
New C# language feature adds ability to declare custom
+=
,-=
,*=
,/=
,%=
,&=
,|=
,^=
,<<=
,>>=
,>>>=
operators, including checked forms for+=
,-=
,*=
,/=
. ECMA-335 already reserves names for non-checked assignment operators, but not for checked assignment operators.The feature also adds ability to declare custom instance (vs. static)
++
,--
operators, including checked forms.API Proposal
Reserve the following names:
--
++
--
++
The names follow the pattern previously used for Checked user-defined operators feature.
ECMA-335 already reserves the following names for non-checked operators:
API Usage
The names will be used by compilers for methods implementing the operators.
Alternative Designs
N/A
Risks
N/A
The text was updated successfully, but these errors were encountered: