Ken is a Melbourne-based FP enthusiast, who writes and speaks about programming, type systems, maths and other fun things. By day, he’s a Lead Developer at REA Group, and helps run the Melbourne Scala User Group.
YOW! Lambda Jam 2017 Sydney
Lenses for the Masses – Introducing Goggles
TALK – 30 mins.
Lenses, or more generally “optics”, are a technique that is indispensable to modern functional programming. However, implementations have veered between two extremes: incredible abstractive power with a steep learning curve; and limited domain-specific uses that can be picked up in minutes. Why can’t we have our cake and eat it too?
Goggles is a new Scala macro built over the powerful & popular Monocle optics library. It uses Scala’s macros and scandalously flexible syntax to create a compiler-checked mini-language to concisely construct, compose and apply optics, with a gentle, familiar interface, and informative compiler errors.
In this talk I’ll introduce the motivation for lenses, why lens usability is a problem that badly needs solving, and how the Goggles library, with Monocle, addresses this in an important way.