u/kubukozcats,cats-effectin r/scala • Recommends
Produce clean APIs with algebraic design - Scala/FP tutorial
#algebraicdesign#cats#cats-effect
3.7K subscribers • 30 videos on Hallway
Intermediate. Assumes working knowledge.
4.2K views5 years ago1 recommendation
Software designProgramming languagesAPI designFunctional programmingScala
Jakub Kozłowski demonstrates how to use algebraic design to build clean APIs and domain-specific languages in Scala.
In this video, I'm showing how I use algebraic design, and how it can be applied in both day-to-day programming as well as more rare cases when we're designing more interesting DSLs. While this is barely scratching the surface and admittedly it's not a full introduction to the technique, I hope this will give you a useful tool for playing around with your interface designs. Thanks to my colleague Olivier Melois who gave me some early feedback on this video! If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) I'm on Twitter: twitter.com/kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubukoz And you can buy me a coffee if you want: ko-fi.com/kubukoz Read the code: github.com/kubukoz/videos/tree/main/adesign Table of contents: - Introduction, overview of the idea - Case study: combos - The key of this approach - Other design considerations, compiling the DSL - Going fully generic with Button - Case study: Security algebra - If you need external operations on a generic type - More typical example - Summary, parting words If you want to learn more: This technique (and more of it) is used in the Red Book (Functional Programming in Scala). Get the second edition early: manning.com/books/functional-programming-in-scala-second-edi… Algebra-Driven Design is a book by Sandy Maguire that focuses on similar ideas (note: I haven't read it yet!): algebradriven.design/What people say. Recommended as a helpful introduction to algebraic design for API design in functional Scala.
u/kubukozcats,cats-effectin r/scala • Recommends