Hello all,
It was yet another exciting night this time hosting Ben Deane!
His talk named “Applicative – the Forgotten Functional Pattern“
Here is the recording:
Ben is a great speaker and he loves Functional programming 🙂
First – the Abstract:
Abstract
Monads get all the press. Functors are often presented as a prerequisite to monads. Applicative (functor) almost never gets mentioned. But it’s massively useful – to the point where a lot of the time when we think about a “monadic interface” what we really want is an applicative interface.
This talk will put applicative in the limelight, showing how it works and why it’s so powerful, with lots of examples grounded in code; there are no category theory diagrams in this talk. Attendees will come away with a solid understanding of the applicative pattern and its many uses. And as a byproduct, their opinions of monads will probably change too.
Optionals. Expected. Ranges. Futures. Parsing. Validation. Error Handling. Transforms. Functions themselves. These are all examples where thinking in terms of applicatives (and importantly, NOT just reaching for “a monadic interface”) helps us write simpler, more composable code. If you’re kind of fuzzy about functors and monads, what’s missing is probably the third piece of the puzzle: applicative.
Summary
I’d classify this talk as intermediate++. Ben mentioned many concepts like optional, ranges, Monads and std::expected just to name a few.
Throughout the talk, Ben presents Haskell syntax and C++. The Haskell part is easy to grok though if you are seeing this syntax for the first time, you might want to pause the recording and make sure you understand it since the sub-sequence slides will build on top of it. There are also some heavy generic programming slides that might need more attention when you go through the recording. No spoilers here on the conclusion and the take away (regarding Monads vs Applicative)
Overall I learned a ton from this talk and have some homework to go and explore more on this domain.
We have an incredible future ahead of us in terms of new syntax and new language and library capabilities.
I’d end with a meme 😉
About BEN DEANE
Principal Software Engineer at Intel
Ben has been programming in C++ for this whole millennium. He spent just over 20 years in the games industry working for companies like EA and Blizzard; many of the games he worked on used to be fondly remembered but now he’s accepted that they are probably mostly forgotten. After getting more interested in modern C++, in the teens he started giving internal company talks and then talks at various conferences, spreading ideas about types, algorithms and declarative and functional techniques. In 2018 he left the games industry and worked in finance for a short spell, writing high-frequency trading platforms using the most modern C++ that compilers could support. Now he is a Principal Software Engineer at Intel where he puts monads inside your CPU.
Thank you!
Kobi