Presentation
Functional programmers in Scala seem to either be fascinated by or mortally afraid of category theory (or maybe a bit of both). At first glance, one wonders why an esoteric branch of mathematics has anything to do with programming. But as it turns out, category theory’s footprints are abound in the code we interact with every day - and they are there for good reasons.
In this talk, a normal software engineer without a math PhD helps us uncover the categorical structures lurking beneath functional Scala code. Defining, demystifying and deriving concepts along the way, we work towards the ultimate goal of demonstrating how these abstractions are useful to programmers in designing, implementing and reasoning about software systems.
Initially, we focus on disambiguating Scala’s language features from the semantics they express. Zooming in on some familiar typeclasses, we aim to shed new light on what they actually mean in the broader perspective outside of Scala. We then turn to the Cats functional programming library to introduce the notion of leveraging arrows as a first class programming construct in place of the pervasive, Java-like “data container” style.
Every concept covered in the talk is underpinned by a simple theme: if we squint our eyes, we can see the arrows underneath. Programmers of all levels interested in functional programming can expect to walk away with a better sense of the “why” behind the strange terminology, while gaining new perspectives on how to leverage functional abstractions in everyday programming.
Narek Asadorian is a Senior Software Engineer with Salesforce, where he writes Scala full time in support of the Salesforce’s machine learning research for sales productivity. He is an all-around functional programming enthusiast with a passion for advocacy and teaching. Narek is also the organizer of Salesforce’s internal programming meetup, #lambda. In his free time, he enjoys making electronic music, fine dining and being outdoors.