[Proposal] Make event a contextual keyword #8087
-
There are scenarios where "Event" can be a business object, for example an EF entity within a software created to sell tickets or a class in an event logging system. Here are usages of In such scenarios it would be much more pleasant to just be able to name variables and parameters The |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 37 replies
-
Contextual keywords also existed since the beginning of C#, for the The position of |
Beta Was this translation helpful? Give feedback.
-
Why is @event unpleasant? |
Beta Was this translation helpful? Give feedback.
-
YES, Please. I use events (as in the theoretical concept) all the time. I use events (as in the C# keyword) pretty much never. Being able to name my "events" |
Beta Was this translation helpful? Give feedback.
-
If the cost of some feature is known to be "marginal" then shouldn't that feature start at -1 or something? |
Beta Was this translation helpful? Give feedback.
-
I was agreeing with you, I wrote "the cost of changing the system to support this is deemed to far outweigh the benefits", |
Beta Was this translation helpful? Give feedback.
-
We are not going to get into digressions about other languages, or minutia of cost analyses. The position for us on keywords so far is that we think they are valuable for the language and ecosystem, and that changing existing keywords to be contextual is a non-goal. If that ever changes, we'd revisit this. But for now, this has effectively been subsumed into the decisions in this space we've had several times over the lifetime of C#. |
Beta Was this translation helpful? Give feedback.
We are not going to get into digressions about other languages, or minutia of cost analyses. The position for us on keywords so far is that we think they are valuable for the language and ecosystem, and that changing existing keywords to be contextual is a non-goal. If that ever changes, we'd revisit this. But for now, this has effectively been subsumed into the decisions in this space we've had several times over the lifetime of C#.