Functional Containers - A gentle introductionPushkar Kulkarni
schedule 7 months agoSold Out!
Functional programming has it roots in Lambda Calculus and Recursion Theory. As we start getting deeper into type systems and type theory, another branch of mathematics becomes significant - Category Theory. If, as a programmer, you tried to read and understand Category Theory chances are high that you dropped the book and went back to life! It happened with me. As users of modern programming languages and libraries, we are often unaware of the amount of design concepts the latter borrow from ideas of Category Theory.
This talk would give a gentle introduction to three of such functional design patterns, I prefer to call them containers - Functors, Applicative Functors and Monads - keeping the all the abstract math away and focusing on getting introduced to them with very simple code examples in Swift. We will also point out some types in the Swift language and the standard library that conform to these patterns. Finally, we prove how the existence of these concepts could make your code better - how they help achieve separation of concerns, eliminate code duplication and managing side effects. Though languages like Haskell make it very easy to express these concepts, they could be expressed in any modern language with a tad bit of code.