How do you download a file from the internet in C++? In JavaScript it's really easy: just call the fetch function and await on the result.
fetch
In this talk I show how to gradually build a coroutine type, and how to make it as user friendly as possible. I will show you how to implement some async algorithms: waiting for all promises to finish, or waiting only for the first one to finish.
I will also go a little deeper and discuss what we've been missing and how coroutines should be improved; I would like to start a discussion about the correct form for such improvements, such as passing a scheduler or safe cancelling.
c++ co_return co_await all( co_await fetch(url) | ctre::search_all<R"(https?://[^"'s)]++)"> | std::views::transform(fetch_with_name) );
View Slides
Hana is working as a staff software engineer in Woven by Toyota. She is author of CTRE (Compile Time Regular Expressions) library and member of WG21 (ISO C++ Committee) where she represent Czechia and chairs Study Group 7: Reflection and Compile Time Programming and co-chairs Evolution Working Group.
Hana is a badass. – Tony Van Eerd