Functional Composable Operations with Unix-Style Pipes in C++ - Ankur Satle - CppCon 2022

--- Functional Composable Operations with Unix-Style Pipes in C - Ankur Satle - CppCon 2022 Let’s write C code like this shaking off all the verbosity and with 100% domain code and ~0% syntax! Do we really need to explicitly state whether a function is a continuation or a transform? return get_env(“KafkaConsumerConfigFile“) | get_file_contents | make_client | connect | subscribe; Unix commands seamlessly compose, piping into each other to form a clear train of operations in one line! Similarly in C , we moved away from non-composable, multi-step processing of ranges using algorithm. We embraced the composable ranges using pipes. This reduced time & space complexity, improved performance, provided clarity & reduced cognitive load when working with ranges. But, when NOT dealing with std::ranges, can one work with such easy composability? Why
Back to Top