logoalt Hacker News

alkonauttoday at 7:24 AM1 replyview on HN

Yes, this doesn't actually add anything to the "size" of the language, if anything it actually shrinks it. It's existing syntax (the ? and ?? operators) and existing semantics. The only thing was that it worked in half the cases, only reads but not writes. Now this completes the functionality so it works everywhere.

You can argue that C# gets a lot of new features that are hard to keep up with, but I wouldn't agree this is one of them. This actually _reduces_ the "mental size" of C#.


Replies

SideburnsOfDoomtoday at 7:29 AM

> his actually _reduces_ the "mental size" of C#

IDK, if you read

  Settings?.RetryPolicy = new ExponentialBackoffRetryPolicy();

as "there is a now a ExponentialBackoffRetryPolicy" then you could be caught out when there isn't. That one ? char can be ignored .. unless it can't. It's another case where "just because it compiles and runs doesn't mean that it does the thing".

This to me is another thing to keep track of. i.e. an increase in the size of the mental map needed to understand the code.

show 2 replies