Let’s Get Lazy—The Real Power of Functional Programming
summary
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
chapters (20)
- 0:00Introduction
- 3:38Example
- 5:10Compute
- 6:15Haskell
- 10:42Why purity is important
- 13:32Defining compute
- 17:48The charm of lambda expressions
- 20:03Lazy expressions in C
- 22:19An imperative example
- 30:10Terminal operations
- 36:21Infinite streams
- 40:11Its cold like this
- 40:52The beauty of imperative code
- 45:11Lazy evaluation
- 46:01Creating a series
- 48:53Lazy evaluations
- 49:15polymorphism
- 50:11encapsulation
- 51:44resources
- 54:52Semantics
related talks
59mLet's Get Lazy
47mLet's Get Lazy: Exploring the Real Power of Streams
01h 06mDesigning Applications with Functional Programming Constructs
01h 06mThe Joy of Functional Programming
49mLazy Java
01h 44mFunctional Programming: Technical Reasons to Adapt
14mFundamentalist Functional Programming
58mKeynote: Why Functional Programming Matters
