3 ms·
There's a new async/await syntax coming, which will make working with network-heavy code much more pleasant. Currently, it's ready in the sense you can write r
by pornel 8y ago
There's a new async/await syntax coming, which will make working with network-heavy code much more pleasant.
Currently, it's ready in the sense you can write robust, high-performance network code. It's still easier than in C or C++, but it's not noob-friendly compared to Node.js or Go yet.
Code based on Futures uses owned closures a lot, so you need to "get" ownership in order not to fight the compiler.
With the async/await syntax, the compiler will be able to relax some of the memory ownership restrictions, and you'll be able to write "normal" code instead of chains of callbacks.