4 ms·
Note that C++ offers async as a library and not as a programming language feature which Bjarne Stroustrup is strongly against. He talk more about why in "The De
by CodeArtisan 6y ago
Note that C++ offers async as a library and not as a programming language feature which Bjarne Stroustrup is strongly against. He talk more about why in "The Design and Evolution of C++" but i don't have the material at hand. As far as i remember, his main argument was that there is no concurrency model to fit them all and thus it doesn't worth to add new syntax and semantics for a specific model except to make the PL more complex and harder to implement.
- roca 6y agoThe main piece is stackless coroutines which definitely aren't a library.
- xfer 6y agoNo without compiler support you can't do async in a library. Rust also does async in library so to speak.
- jcelerier 6y ago> Note that C++ offers async as a library and not as a programming language feature which Bjarne Stroustrup is strongly against. https://www.modernescpp.com/index.php/c-20-coroutines-the-first-overview https://www.modernescpp.com/index.php/c-20-coroutines-the-fi...
- tick_tock_tick 6y agocoroutines themselves have nothing todo with async/await.
- jcelerier 6y agoI wonder what that co_await keyword is for then
- nly 6y agoThere's no executor in the standard library for asynchronous work, the C++20 coroutines implementation lets you plug in your own Dummy event loop example: https://gcc.godbolt.org/z/fo18xW https://gcc.godbolt.org/z/fo18xW