Thinking Functionally with C#
summary
Claims that C# can be written functionally for more predictable, testable code and shows concrete patterns: use LINQ aggregate and zip instead of for loops, replace ifs with switch expressions replacing ifs, represent errors with a Result/discriminated union style monad that binds or short‑circuits. Demonstrations include immutable state via creating new objects (Doctor Who example), trampolined loops for indefinite iteration, and composition of small pure functions; notes pragmatic limits (interop, performance and existing imperative APIs) and gives working C# idioms.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 3:33Functional vs imperative
- 7:00Advantages and disadvantages of functional programming
- 10:29Immutability in C#
- 14:42Challenge: immutability
- 14:56Results-oriented FP
- 19:03Pure functions
- 22:19Statements to functions
- 27:21Handling loops in functional C#
- 29:48Project structure
- 31:33Side effects with unions
- 37:55Railway architecture
- 38:37Domain modeling
- 41:53Conclusion
related talks
43mEverything You Always Wanted to Know About Functional Programming...
45mFP: The Good, the Bad and the Ugly
37mBuilding Reactive Services Using Functional Programming
14mAchieving High-Performance the Functional Way - A Functional Pearl on Expressing High...
51mPragmatism, Puritanism and Functional Programming
01h 05mMonads in Modern C++
43mProgramming Safely in an Uncertain World (Part 2)
33mApplying Functional Programming Patterns
