4 ms·
The first time I heard of async/await was actually with Microsoft C#; so I'm not too surprised to see them prioritize this feature in JS land. ...which is cool
by daveidol 11y ago
The first time I heard of async/await was actually with Microsoft C#; so I'm not too surprised to see them prioritize this feature in JS land.
...which is cool, because using async/await in C# made me realize how much simpler dealing with async code could be (compared to my experience with JS callbacks or Java threads).
- apaprocki 11y agoIt was the first interaction we (at Bloomberg) had with async/await as well. We really wanted to see it come to JS and as the spec was evolving it was clear that the path to getting there (if TC-39 ultimately agreed async/await was a desired thing) was going to be via generators. That is how we wound up getting involved with Igalia back in Feb 2013. I kicked off a multi-year project with Andy Wingo / Igalia to direct his mighty keyboard at generators and get them landed in v8. We weren't quite sure TC-39 would agree async/await was a good thing in the end, but it seems now all the pieces are finally coming together. It is satisfying to see the endgame within reach right now and I hope it is worth it once it starts to become more widely available! Companies -- help get spec features implemented! We essentially acted as the bank when it came to the generators work. You don't need to land the code yourself to help move the needle. Thank you Igalia for being awesome.
- stupidcar 11y agoI know you guys at Bloomberg have also sponsored Igalia to work on implementing CSS Grid Layout as well. Most web devs seem to be unaware, but I assure you those of us who are definitely appreciate it!
- eco 11y agoMicrosoft is also pushing for async/await in C++ in the form of stackless resumable functions complete with an implementation before C++17 has been standardized. http://blogs.msdn.com/b/vcblog/archive/2014/11/12/resumable-functions-in-c.aspx http://blogs.msdn.com/b/vcblog/archive/2014/11/12/resumable-...
- PopsiclePete 11y agoI'm a little sad the async/await model is winning over. I really prefer Go's CSP. It can do everything the async/await model can, plus "streaming" API's. I dig (sorta) C#'s async/await, but I still don't see why it's "winning" over other, better models...
- idibidiart 11y agoCSP can be implemented on top of async/await, which itself is implemented on top of promise and generators. What does streaming APIs have to do with CSP per se?
- findjashua 11y agofor consuming 'streaming APIs', why not just use observables (rx.js etc)?
- bklimt 11y agoObservables are great, and are indeed the stream equivalent to Tasks. But the await/async keyword compilation doesn't support them. I think that's the parent post's point.
- josteink 11y agoI've seen stream-like constructs done with c# async and await and to me it even looked elegant. Could you expand on in what way you think async and await is insufficient with regards to streams? I'm genuinely curious.
- colin_jack 11y agoWould you have a link to an example of a streaming API done elegantly with async? I'm interested to see what it looks like.
- josteink 11y agoIt was during a presentation on the NDC developer conference a few years back, when the feature was new to C#. I remember thinking it was one of the best presentations that year, but right now I don't remember what year it was, and I can't find any past agendas to search either. NDC posts their videos online after each conference, and I did a quick skim. I think it may be this session here, but I haven't double-checked: https://vimeo.com/43808831 https://vimeo.com/43808831 Edit: It was a 2-part session and it may also have been in second half. Link here: https://vimeo.com/43808833 https://vimeo.com/43808833