Functional Programming: data
summary
Claims that C++17 tools make state-safe, lock-free designs practical: uses std::variant/std::optional plus std::visit/overloaded for exhaustive, zero-pointer state machines (examples: web-fetch word counter, a correct tennis scorer) and implements persistent collections with a bitmap vector trie (32-ary, ~10 levels) so copies share most memory. Benchmarks show the persistent vector is barely slower than std::vector; updates copy only the path to a leaf so logical updates are effectively constant-time and resource disposal is automatic.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:34Disclaimer
- 3:17Word counting
- 7:52Product types
- 9:11Inheritance
- 14:58Unions
- 20:28Other sum types
- 22:00Tennis kata
- 27:04Better handling of sum types
- 36:54Linked lists - appending
- 39:12Linked lists - inserting
- 42:34Bitmapped vecor trie-lookup
- 47:57Okasaki
- 49:19Answers? Questions! Questions? Answers!
related talks
01h 09mFunctional Programming in C++
58mThe Imperatives Must Go! [Functional Programming in Modern C++]
59mstd variant and the power of pattern matching
23mFunctional Programming in C++ (Run time vs Compile time types)
48mBack to Basics: Cpp Value Semantics
49mA Journey Into Non-Virtual Polymorphism in C++
59mThe Many Variants of std::variant
01h 04mFunctional C++ for Fun and Profit
