5 ms·
> They had promises and async/await in 1995. Really? Do you have a source on this? I was under the impression that C# was the pioneer here.
by dom96 6y ago
> They had promises and async/await in 1995.
Really? Do you have a source on this? I was under the impression that C# was the pioneer here.
- jcelerier 6y agopromises, futures, etc... are much older - it takes 15 years for stuff pioneered in research to make it into general purpose langs :p - https://d1wqtxts1xzle7.cloudfront.net/50657913/p260-liskov.pdf?1480599977=&response-content-disposition=inline%3B+filename%3DPromises_linguistic_support_for_efficien.pdf&Expires=1610200011&Signature=BEYyYwFDSL5eQAXnTHmvqVZh0MndxFKi0qmtUzmm1M41Zzk2uPeHTAwo9mMd74sTsn8Ap1W3yG15qYYOrUusIEWQ-ShmdVwWnm3x-bdQL4qrpS8Nq7M~mTM~pqSHquaG-~DqO7-dSvvFCsMqO3dJTg9rRxbkLnQSZdJoAOrJ~qSPm917gVCYLkqXSw-xTEP~oERVPe8i5DymDRssnIrCdl2BtgzY9ZiJP4rNdjHTYTby80hc-UHkNfUJ1RSQ6lXsuCDzZuBscwS1lZIN2452m1NUC6wCEv0vAw65Dix-mQt1ClZDpAtvpQfpBmbGEWUxtNLUdnt85slAlJoay6i1vg__&Key-Pair-Id=APKAJLOHF5GGSLRBV4ZA https://d1wqtxts1xzle7.cloudfront.net/50657913/p260-liskov.p... - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.97.1841&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.97....
- jokethrowaway 6y agoMore precisely, I was referring to monads and do-notation with that phrase. Here are some references on when it was invented / implemented: https://www.reddit.com/r/haskell/comments/8rkrgq/when_was_donotation_introduced/ https://www.reddit.com/r/haskell/comments/8rkrgq/when_was_do... Also a JS gist on async/await and do-notation: https://gist.github.com/MaiaVictor/bc0c02b6d1fbc7e3dbae838fb1376c80 https://gist.github.com/MaiaVictor/bc0c02b6d1fbc7e3dbae838fb...
- arianvanp 6y agoAsync/await is specialised syntax for a more generic concept of monads which haskell was the language in which this was heavily researched. Specifically continuation monad describes asynchronous computation (promises) and was one of the motivating examples In the early 90s going back all the way to Moggis original "notions of computations" paper from 1991 http://homepages.inf.ed.ac.uk/wadler/topics/monads.html http://homepages.inf.ed.ac.uk/wadler/topics/monads.html Async/await and LINQ were the brainchild of Erik Meijer. A haskell researcher. Also see https://news.ycombinator.com/item?id=25565229 https://news.ycombinator.com/item?id=25565229 from a recent discussion here. Specifically http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.72.868&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.72.... where Eric tells his story about bringing haskell concepts to .NET
- daxfohl 6y agoFwiw, c# wasn't even the first dotnet language with it. F# had async computation expressions a few years earlier.
- sideeffffect 6y agoBut F# doesn't have async/await. As you write, it has "computation expressions", which are inspired by Haskell's "do-notation", but are more generalised and powerful (than both Haskell's "do-notation" or Scala's "for-comprehension", let alone async/await). One of the things I liked best about F#.
- daxfohl 6y agoIdk if you can strictly say that. Haskell allows more generalized do blocks because of HKTs. I blogged about this a few years ago. https://www.sparxeng.com/blog/software/higher-kinded-fun-in-haskell https://www.sparxeng.com/blog/software/higher-kinded-fun-in-.... (Granted, I've never had a use for that beyond code golf). And C# is nice because you can await anywhere in an expression instead of just at a "let!" declaration. This is something I do miss when using F#. But agreed, F# is usually my language of choice.
- daxfohl 6y agoI think the Haskell abstraction is what allows monad transformers. Saw some hacks in F# to allow similar, but you lose generic "lift", for instance.
- paavohtl 6y agoEven though the concepts weren't invented for C#, you are technically correct in that C# pioneered the keywords async and await.