~/talk

Transforming Your C# Code to Functional Style

slides:none on file

Shows concrete refactorings from imperative loops and classes to concise functional patterns: replaces index loops with LINQ Where/Select/ForEach, turns strategy interfaces into Func<double,double> instead of classes, implements a reusable measure(Func<T>) stopwatch wrapper that returns elapsed time, and uses lazy evaluation and FirstOrDefault with predicate for first-available selection. Claims fewer lines, easier parallelization, far simpler tests (no heavy mocking), and practical examples like prime filtering and timing that prove the transformed code compiles and runs.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:18Imperative vs functional style
  3. 4:52First example with loops
  4. 8:48Internal vs external iterators
  5. 11:15Filtering collections
  6. 15:18Declarative vs imperative code
  7. 18:48Statements vs expressions
  8. 23:32Finding prime numbers functionally
  9. 27:35Refactoring imperative prime check
  10. 32:02Audience reflection on coding styles
  11. 35:31Debugging in functional style
  12. 37:26Parallelizing functional code
  13. 37:47Tell vs ask principle
  14. 39:58Functional room booking example
  15. 43:12Strategy pattern with functions
  16. 45:29Eliminating interfaces with lambdas
  17. 48:44Timing code execution functionally
  18. 51:42Measuring function performance
  19. 52:48Replacing inheritance with functions
  20. 55:05Lightweight design benefits
  21. 56:34Refactoring and future possibilities
  22. 57:40Summary and closing
~/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.