~/talk

Let’s Get Lazy—The Real Power of Functional Programming

Talkat NDC London 2017 · 2017-01-16..01-20· [functional-programming]
slides:none on file

Demonstrates that lazy evaluation cancels unnecessary work: Haskell’s normal-order evaluation skips computing add when the result is never needed (shown via GHCi breakpoint), while Scala uses lazy to defer evaluation and C# uses Lazy<T>/Supplier-style lambdas to achieve similar behavior. Shows a concrete example (numbers 1,2,3,5,4,6,7,8) where imperative code does eight vs a naive 21 operations but the lazy stream pipeline (Java’s Stream.iterate, filter, map, limit, sum) only evaluates what’s needed; infinite streams work because evaluation is on demand. Advises purity to safely rely on laziness and warns about IEnumerable re-enumeration pitfalls.

AI-written summary · about

  1. 0:00Introduction
  2. 3:38Example
  3. 5:10Compute
  4. 6:15Haskell
  5. 10:42Why purity is important
  6. 13:32Defining compute
  7. 17:48The charm of lambda expressions
  8. 20:03Lazy expressions in C
  9. 22:19An imperative example
  10. 30:10Terminal operations
  11. 36:21Infinite streams
  12. 40:11Its cold like this
  13. 40:52The beauty of imperative code
  14. 45:11Lazy evaluation
  15. 46:01Creating a series
  16. 48:53Lazy evaluations
  17. 49:15polymorphism
  18. 50:11encapsulation
  19. 51:44resources
  20. 54:52Semantics
~/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.