Hacker News new | ask | show | jobs
by uryga 1551 days ago
https://en.m.wikibooks.org/wiki/Haskell/do_notation

rough analogy: `await` replaces `.then()`, do-notation replaces `.flatMap()`

1 comments

C# has had Nullable<T> for many years before it got stuff like ?. and ?? that mostly covers this, and it was, well, tolerable.
Ergonomics sucked and a lot of people didn't use them (or even know they existed!) because ergonomics sucked
From my work experience at the time, it was used pretty heavily in new codebases.
I mean the fact that they've been around since 2.0 but you saw it used heavily in new codebases says a lot doesn't it?
You misunderstood - I saw them in codebases that were new back when .NET 2.0 was new.

To be more precise, it was when .NET 3.5 was new (2008). That brought a lot of visibility to Nullable<T> because it was featured prominently in LINQ. But ?. didn't come until C# 6 (2014). I was wrong about ??, though - that one was added along with Nullable itself.