Functional Programming in C++?, Run-time vs Compile-time types
In this talk, we'll explore the power of compile-time programming in C++14 by delving into the design and use of compile-time types. Through simple templated polymorphism driven by enum values, we'll show how you can leverage constexpr functions to compute values during compilation, drastically improving performance and reducing runtime overhead.You'll also see how to serialize these types at compile-time, demonstrating the efficiency of working with types without the need for runtime computations. Finally, we’ll explore parsing these serialized types back into their original forms using handwritten parser combinators, showcasing the flexibility of C++ for functional programming at compile-time.This session will provide a hands-on look at how functional programming paradigms can be applied to C++ to enhance type safety, performance, and overall program design—all while staying within the boundaries of C++14.