Back To Schedule
Saturday, November 17 • 11:10am - 11:30am
Duality and How to Delete Half (minus ε) of Your Code

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

There’s a prefix that shows up a lot in Haskell: “co-”. There are “comonads” and “coalgebras” and “covariant functors” … wait a second, that last one means something different than the others. But what, and how? I’ll explain the concept of duality (at least in category theory, you’re on your own for metaphysics) and distinguish it from often confused concepts like variance and isomorphisms. Duality often seems too abstract to be useful, but it can help us in a variety of ways, and we can take advantage of it to simplify (and even eliminate) writing certain kinds of code. While not all the components exist in Scala yet, we’ll discuss what is there and how it can be used to automate building some useful constructions. I am porting a tool for programmatically generating dual constructions that I wrote in Haskell (https://github.com/sellout/dualizer) to Scala. It can hopefully both reduce the amount of code you write and give you a new way to explore category theory.

avatar for Greg Pfeil

Greg Pfeil

Senior Software Engineer, Formation
Greg has been working full-time with pure FP in Haskell and Scala for over six years. He currently abuses laziness for Formation, to extract efficient evaluation from exponential algorithms. He’s also known for inflicting recursion schemes on everyone and designing languages that... Read More →

Saturday November 17, 2018 11:10am - 11:30am PST