Product and sum types allow us to exactly model any number of states with a lot of flexibility.
Thoughts on Functional Programming Podcast
An off-the-cuff stream of Functional Programming ideas, skills, patterns, and news from Functional Programming expert Eric Normand.
I was asked a great question by a listener about whether it’s always possible to find a good domain model. Sometimes, the business rules are so messy, how can we find something clean and stable? In this episode, I explore how we can find a stable and clean domain model within the chaos.
We use the term ‘abstraction’ all the time. But what does it mean? If it’s such an important concept, we should have a clear idea of its meaning. In this episode, I go over two related definitions from two important sources.
Stratified design is one where you build more specific things on top of more general things, typically with many layers. But why is this powerful? In this episode, we explore why it’s sometimes easier to solve a more general problem than a specific one.
We often write software to automate an existing physical process. But what makes this possible? When translating from physical to digital, something must be preserved. In this episode, we look into what is preserved across that translation and why algebraic properties might help us find it.
Definitions of functional programming disagree with each other and often don’t encompass the broad range of languages and practices we find in industry. The definitions also make it seem incompatible with other paradigms, such as object-oriented and procedural. However, if you look at FP as a set of skills, both problems are solved. We can find skills that functional programmers tend to use and not be incompatible. In this episode, I explore some important, high-level skills that functional programmers employ.
Computer commercialization set research back decades and we still haven’t recovered. I explore why that is and end on some hopeful notes.
Through conversations, I’ve realized that there’s two kinds of data modeling that are distinct. They have their own constraints and needs and, consequently, their own techniques. In this episode, I explore what makes them different.
Product and sum types are collectively known as ‘algebraic data types’. These are two ways of putting types together to make bigger types. Product types multiply their states, while sum types add them. With these two ‘operations’, we can precisely target a desired number of states. In this episode, we explore how we can eliminate corner cases with algebraic data types.