Monocle 3: a peek into the future
summary
Explains concrete Monocle 3 changes: a focus macro that generates lenses/prisms/indexes from a dot-path (IDE-completion friendly) and runs only on Scala 3, a monocli prototype, and a plan to add previously-rejected combinators like zip/filter/withDefault. Argues these simplify boilerplate and onboarding, accepts occasional law-violating edge cases but documents them, and asks for community contributions; demonstrates the macro approach on nested case classes, maps and enums and shows it compiles and produces the expected get/replace behavior.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:16Afp-tower
- 1:01Julien Truffaut
- 1:42Agenda
- 2:32Mutation
- 3:43FP uses immutable data
- 5:03Concurrency
- 8:42Simple case
- 9:47Enumeration
- 13:14Data structure
- 15:36Optics: Lens, Optional, Traversal, Prism, Iso,...
- 16:19Optics composition
- 18:07Why optics are not popular in Scala?
- 18:55Problem #1: Optics creation
- 20:27Monocle 2 macros
- 21:12Solution: Focus macro (Scala 3)
- 23:27Problem 2: Lawfulness
- 24:15Problem 2: Expected behaviour
- 25:40FP library design principle
- 26:45Zip can break the expected behaviour
- 28:42FP DEVELOPERS
- 29:04Solution: Documentation
- 29:24Monocle 3: Focus on user experience
- 30:42Join the team








