Pattern matching provides a declarative approach to perform structured inspection on complex data types. It’s a very powerful abstraction provided by many programming languages such as Haskell and OCaml, and more recently, Rust, Scala, and Swift.
In this talk, we’ll discuss a proposal in flight (https://wg21.link/p1371) to add pattern matching as a language feature in the C++. We’ll discuss why pattern matching is more relevant today to C++ than ever before, many examples of how pattern matching simplifies the structure of code, and discuss the details of the concrete features being proposed.
The goal of the talk is to communicate the state of an early proposal and gather feedback.
I'm a software engineer at Facebook, working on the C++ libraries and standards team. My focus for C++ is to introduce pattern matching to facilitate better code.