Has anyone found a compelling use for C++ coroutines? I check every couple of months and every time it always seems like coroutines require huge supporting libraries or are trivially replaceable with a lambda just for a slightly different syntax. It feels like they're going to be the new exceptions.
Conversation
Notices
-
Embed this notice
Coyote (coyote@social.singing.dog)'s status on Monday, 08-Jan-2024 13:02:44 JST Coyote -
Embed this notice
Sexy Moon (moon@shitposter.club)'s status on Monday, 08-Jan-2024 13:02:41 JST Sexy Moon @RustyCrab @Coyote use them on things like 8 bit chips where you don't get much processing power. -
Embed this notice
Rusty Crab (rustycrab@clubcyberia.co)'s status on Monday, 08-Jan-2024 13:02:42 JST Rusty Crab @Coyote coroutines are niche but insanely useful for their niche. Specifically if you are making finite state machines they take pretty horrible code and make it very VERY simple to read. -
Embed this notice
Sexy Moon (moon@shitposter.club)'s status on Monday, 08-Jan-2024 13:04:03 JST Sexy Moon @RustyCrab @Coyote oh I Was thinking of protothreads -
Embed this notice
Sexy Moon (moon@shitposter.club)'s status on Monday, 08-Jan-2024 13:06:25 JST Sexy Moon @RustyCrab @Coyote are they like generators -
Embed this notice
Rusty Crab (rustycrab@clubcyberia.co)'s status on Monday, 08-Jan-2024 13:06:26 JST Rusty Crab @Moon @Coyote nah this is cooperative multithreading which is something terribly underutilized in programming as a whole. It allows you to write regular looking functions that execute over time without any of the dangers of memory corruption, race conditions etc
-
Embed this notice