Petter Holmberg: Functional parsing in C++20
Channel: SwedenCpp
Date: 2022-03-03

Is C++20 a language that supports a functional style of programming?
Can we write modern C++ code in a pure functional style that would easily translate into a pure functional language like Haskell, and could that C++ code end up looking just as nice while still being reasonably efficient?
In this talk we will take a practical approach and apply ideas from functional programming to a common and non-trivial problem - parsing strings - and develop a small pure functional parsing library from the ground up. On the way we will encounter many nice features from C++20 that, while optional, make this task a lot easier and results in code that can compete with functional languages for clarity and expressiveness.
This talk does not assume theoretical knowledge of functional programming concepts or practical experience with a functional language. You also don't need to know how to write parsers or have many hours of C++20 under your belt.

Slides:
https://github.com/petter-holmberg/talks/blob/master/FunctionalParsingCppSthlm1F.pdf

Code:
https://github.com/petter-holmberg/eop-parser
https://github.com/petter-holmberg/talks/tree/master/wirth-parser

--
Event was recorded at the Atlas Copco office in Stockholm
https://www.atlascopco.com/sv-se

Meetup Event:
https://www.meetup.com/StockholmCpp/events/283856715/