C++ Coroutines Do Not Spark Joy

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • cppcoro

    A library of C++ coroutine abstractions for the coroutines TS

  • It is possible to compose them more easily than described in the article; Lewis Baker's cppcoro library for example provides a recursive_generator<> type[0] that allows this without using any macros. It's up to the library part of coroutines to make things easy, end users are not expected to write low-level coroutine code themselves.

    I wonder about the allocation elision. Return value optimization became mandatory, and some compilers can already elide calls to new/delete and malloc()/free() in normal code, so perhaps it will be possible to guarantee allocation elision in the future in the most used cases.

    [0]: https://github.com/lewissbaker/cppcoro#recursive_generatort

  • Jai-Community-Library

    Tutorials and Cheatsheet for Jai, written by its community

  • > D suffered from [...] indecision between GC and manual memory management.

    It is still suffering from that. If you want to manage memory yourself you can't use some parts of the standard library + you can't use a lot of the community packages since they assume there is a GC present.

    So far it looks like the best alternative is Zig, but sadly it doesn't have some of the higher-level language features such as function overloading or macros. Jai seems to have most D features and more without the GC [0] but Zig is more likely win popular mindshare since it already is in the open + comes with a C/C++ compiler which is pretty cool.

    [0] https://github.com/Jai-Community/Jai-Community-Library/wiki

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Folly

    An open-source C++ library developed and used at Facebook.

  • I think C++ coroutines is best understood not as something you'd use directly, but as plumbing that makes existing async libraries interoperable and easier to use.

    For example, Facebook's Folly has been updated to use coroutines and is being widely adopted at FB:

    https://github.com/facebook/folly/tree/main/folly/experiment...

  • Cap'n Proto

    Cap'n Proto serialization/RPC system - core tools and C++ library

  • A coworker added coroutines to KJ [1] so for our purposes it’s “made it”. It’ll be more broadly useful obviously with library support in the standard. I think that’s targeted for c++23

    [1] https://github.com/capnproto/capnproto/blob/master/kjdoc/tou...

  • ocamlunix

    Unix system programming in OCaml book

  • They don't need it,

    "Unix system programming in OCaml"

    https://ocaml.github.io/ocamlunix/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts