20 ms·
> I’m not totally sure if this is a GOOD idea to add to the c++ standard What are the downsides? Naively, it seems like a good idea to both provide a coroutine
by uvdn7 1y ago
> I’m not totally sure if this is a GOOD idea to add to the c++ standard
What are the downsides? Naively, it seems like a good idea to both provide a coroutine spec (for power users) and a default task type & default executor.
- valorzard 1y agowell, Rust didn't do the same thing for a reason. Rust lets you pick and choose what async runtime to use (even though everyone has decided to use Tokio anyways). This is good because it allows for alternative async runtimes like Embassy (https://embassy.dev/ https://embassy.dev/) and it also doesn't freeze the API into something that can't change. It could totally be possible that people find a new style of async that works better than std::execution.
- Rohansi 1y agoI don't know how it works for C++ but you're not locked down to a single implementation with how C# does it. You can have it use different executors/schedulers, different task types, etc.
- uvdn7 1y agoYou are also not locked down in C++. There are already a handful of coroutine and async runtime implementations out there.