Programming Safely in an Uncertain World (Part 2)
summary
Claims that algebraic data types collapse multiple failure modes into one principled result and shows the actual code: Maybe, Either, and Future used with map / chain (flatMap) and join to avoid exceptions, Sanctuary.parseJSON to catch parse errors, and sequence as a generic Promise.all alternative. Example builds a pipeline that parses JSON, safely prop-drills X.Y.Z into an array of hex strings, validates and sums them, and yields Just(sum) or Nothing when any step fails.
AI-written summary · about
chapters (7)
- 0:00Start
- 5:08Pausing Adjacent String
- 13:22Lookups
- 15:32Sequence
- 21:41Flusha
- 28:01Testing the Happy Path
- 28:30The Naive Javascript Solution
related talks
45mRailway Oriented Programming - A Functional Approach to Error Handling
29mTreasure.map(): Functional Programming in Kotlin
26mEssential Functional Structures: Functor, Applicative and Traverse
33mApplying Functional Programming Patterns
43mThinking Functionally with C#
53mFunctional Async on the JVM
43mEverything You Always Wanted to Know About Functional Programming...
47mIntroduction to Algebraic Effects
