logoalt Hacker News

Metasyntactictoday at 7:32 AM0 repliesview on HN

> Cute, but is this actually needed? It's one more thing to remember, one more thing to know the subtleties of, and for what?

Hi there! C# language designer here :-)

In this case, it's more that this feature made the language more uniform. We've had `?.` for more than 10 years now, and it worked properly for most expressions except assignment.

During that time we got a large amount of feedback from users asking for this, and we commonly ran into it ourselves. At a language and impl level, these were both very easy to add in, so this was a low cost Qol feature that just made things nicer and more consistent.

> It feels like the C# designers have a hard time saying "no" to ideas coming their way.

We say no to more than 99% of requests.

> We're trading brevity for complexity

There's no new keyword here. And this makes usage and processing of `?.` more uniform and consistent. Imo, that is a good thing. You have less complexity that way.