~/talk

Thinking Functionally with C#

Talkat Øredev 2024 · 2024-11-06..11-08· [machine-learning]
slides:none on file

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

  1. 0:00Introduction
  2. 3:33Functional vs imperative
  3. 7:00Advantages and disadvantages of functional programming
  4. 10:29Immutability in C#
  5. 14:42Challenge: immutability
  6. 14:56Results-oriented FP
  7. 19:03Pure functions
  8. 22:19Statements to functions
  9. 27:21Handling loops in functional C#
  10. 29:48Project structure
  11. 31:33Side effects with unions
  12. 37:55Railway architecture
  13. 38:37Domain modeling
  14. 41:53Conclusion
~/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.