Allow null-conditional operators and null-coalescing operators to be overloaded (see issues) #6618
Replies: 3 comments 5 replies
-
IMO this is not a language concern. Unity is violating the CLI soecs and behavior in ways that break how |
Beta Was this translation helpful? Give feedback.
-
A poll worded "improve the life of" versus "screw" does not inspire confidence in the results. |
Beta Was this translation helpful? Give feedback.
-
I've locked this discussion as the format of the question is not appropriate for this repository. Labeling an option as "NO (screw game developers)" is a disingenuous choice. |
Beta Was this translation helpful? Give feedback.
-
These four operators have to be overloaded in the Unity game engine (very popular) but cannot, and is therefore making all four operators incompatible with Unity objects. The workarounds to use those operators on non-Unity objects and at the same time taking action on the code style suggestions for these operators with Unity objects, requires clumsy extensions and in my case even an (Unity) editor utility to initialize a singleton with early access for editor scripts if it's null.
This all just to get rid of the code style suggestions and keep things as nice and consistent with those new operators as it can be. These workarounds aren't standarized either! So most Unity game developers do not even use the new operators at all and are simply turning off the code style suggestions for it. Please make these operators available to everyone by making the exception to have them become overloadable.
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions