News for hackers. Stuff that matters.
Re:Memory usage of a toy C# server and client with 500K conc... by int_19h on Sunday January 27, 2019 @05:10AM (#19011152)
The problem with all the other solutions is that they end up being language-specific. That article you've linked to lists the various languages that chose that route: Go, Lua, Ruby. Now try invoking a Lua coroutine from Go, and have it interop properly with goroutines while running.

The nice thing about async/await is that it's just a wrapper around futures, which are themselves a composable wrapper around callbacks (semantically; the implementation can be more efficient, of course). So any language that can express function callbacks as first-class values can represent a future, and any language that can represent a future can interop with the async/await world. Which is why you can have JS code doing await on C# code doing await on C++ code in a Win10 UWP application, and it all works. And you can take existing libraries and frameworks that use explicit callbacks (often written in C), and wrap that into futures such that it's all usable with await.

Re:Memory usage of a toy C# server and client with 500K conc... by dom96 on Sunday January 27, 2019 @08:05AM (#19011540)
This is 100% correct. I've never seen this reasoning presented so well before. You're absolutely right, there are languages out there that target the web and the backend on the seever, they can do that and use async await for both targets.
Re:Memory usage of a toy C# server and client with 500K conc... by thebruce87m on Sunday January 27, 2019 @11:12AM (#19012222)
This is one of those things that sound amazing and powerful, but without a concrete example I have no feeling for how revolutionary it is.
Re:Memory usage of a toy C# server and client with 500K conc... by int_19h on Monday January 28, 2019 @06:58PM (#19022387)
For example, WinRT uses futures for asynchrony, and so does Python 3. As a result, it's possible to represent asynchronous WinRT APIs as asynchronous Python methods, such that you can write idiomatic Python code (with await).