Haskell Design Patterns for Genericity & Asynchronous Behavior
summary
Compares concrete Haskell patterns to C++ implementations: shows a hash-set built from type classes and instantiated with C++ Concepts and demonstrates the implementations are parallel and type-checked at compile time; exhibits a toy evaluator where plain ADTs fail to express distinct int/boolean results but a GADT fixes evaluator typing via indexed constructors (at the cost of nontrivial type annotations and typechecker issues); proves a function functor instance for (-> r) where fmap = composition and contrasts extensibility tradeoffs (row vs column).
AI-written summary · about
chapters (12)
- 0:00Introduction
- 4:10How does this impact C++?
- 6:13Haskell Features
- 11:26Instances of Type Classes
- 13:43Type class notes
- 20:50An example using Algebraic Data Types in Haskell
- 25:12Algebraic Data type-like implementation in C++
- 27:23Pattern Matching
- 28:19The Oop approach to evaluation
- 31:18Adding behaviors
- 32:34Adding Discriminated Unions
- 45:47Algebraic Data Types vs Oop
related talks
38mWhat Haskell Taught Us When We Weren't Looking
33mRust and Haskell, sitting in a tree
52mFunctional Patterns for the Object Oriented
01h 47mFunctional C++
58mMonoids, Monads, and Applicative Functors: Repeated Software Patterns
40mWhat Haskell taught us when we were not looking
57mDesign Patterns in Dynamic and Functional Languages
57mApplied category theory and abstract algebra
