Monads in Modern C++ - Georgi Koyrushki & Alistair Fisher - CppCon 2023

Discover the power of monads in modern C++ and how they can help you write safer, more efficient, and predictable code, with practical examples and insights from GParsoid implementations.

Key takeaways
  • Functional programming is essential to understand to write safer and more efficient code.
  • Monads are a fundamental concept in functional programming, and GParsodies implementations.
  • Problem-solving in GParsoid is more about avoiding the need to explicitly handle return types, nulls, and errors.
  • Monads can be used as views over data.
  • Maybe/Optional is a monad used in GParsoid.
  • It is very useful for dealing with errors, and practical examples.
  • Experimenting with Monads can lead to better code quality and mutability-free code.
  • Code with Monads ensures that the introduction of a type end better understand how it behaves and works.
  • Code with Monads provides more control and predictability.
  • Functional programming with Monads makes it easier to understand how to write safe and predictable code.
  • Monads can be compared to a state machine that applies readable and understandable.
  • These patterns can guide and help to create better software, which is more free from defects.
  • Monads in GParsoids can open up new possibilities for building more expressive and more enjoyable to use interfaces.