Statically typed functional programming languages like F# encourage a very different way of thinking about types. The type system is your friend, not an annoyance, and can be used in many ways that might not be familiar to OO programmers.
Types can be used to represent the domain in a fine-grained, self documenting way. And in many cases, types can even be used to encode business rules so that you literally cannot create incorrect code. You can then use the static type checking almost as an instant unit test — making sure that your code is correct at compile time.
YOU MAY ALSO LIKE:
- Understanding Parser Combinators: A Deep Dive - Audience Level: Beginner (SkillsCast recorded in April 2017)
- Domain-Driven Design in Practice with Michael Plöd (Online Workshop on 13th - 15th December 2022)
- Haskell at Work (Online Workshop on 30th January - 2nd February 2023)
- Haskell eXchange 2022: Novice Track (Online Conference on 7th December 2022)
- Haskell eXchange 2022: Online Conference (Online Conference on 8th - 9th December 2022)
- Domain Driven Design in Cloud Native Environments (SkillsCast recorded in November 2022)
- Getting FP Into DDD - For Real (SkillsCast recorded in November 2022)