~/talk

Refactoring Legacy C++ OOP Application Code with Functional Programming and Type Erasure Concepts

Talkat C++Now 2026 · 2026-05-04..05-08· [c-and-cpp]
links:none on file
slides:none on file

Shows how to incrementally refactor a legacy C++ order-management codebase by extracting pure functions, replacing exception/bool error patterns with std::expected for monadic chaining and short‑circuiting, modeling states with std::variant to get exhaustiveness, and replacing intrusive inheritance with concept‑checked type‑erasers (std::function / move_only_function / any‑like wrappers) to build configurable declarative pipelines. Provides concrete migration steps: adapters for roundtrip compatibility, property tests (commutativity, idempotence), and reports partial real‑world adoption with reduced coupling and safer compile‑time guarantees.

AI-written summary · about

  1. 0:00Legacy code modernization
  2. 3:30Risks in legacy OOP code
  3. 7:02Functional programming and type erasure
  4. 11:55Extracting pure functions
  5. 17:32Type-safe error handling with std::expected
  6. 25:20Decoupling with type erasure
  7. 34:57Type erasure with concepts
  8. 46:22State modeling with std::variant
  9. 50:11Declarative pipelines
  10. 56:34Migration strategies
  11. 1:02:34Action plan and trends
  12. 1:05:04Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.