A Blog on Types and Functional Patterns
Here is a blog series providing some background reading that you may find interesting while learning some of the techniques used in Higher-Kinded-J.
This is a web series that brewed some of the ideas that kicked off Higher-Kinded-J
In this post we explore the power of Algebraic Data Types(ADT) with Pattern Matching in Java. We look at how they help us model complex business domains and how using them together gives improvements on the traditional Visitor Pattern.
In this post we look at Variance in Generics and how it is handled in Java and Scala. We consider use-site and declaration-site approaches and the trade offs of erasure. Finally we take a look at Phantom and Existential types and how they can enhance the capabilities of the type system when it comes to modelling.
In this post we will see how Intersection types help us better model type constraints promoting reuse and how Union types increase code flexibility. We will compare and contrast approaches and how to use in the latest Java and Scala.
Learn about how Functors and Monads provide patterns to write cleaner, more composable, and robust code that helps us deal with operations like handling nulls, managing errors and sequencing asynchronous actions.
In this post we will see how Higher Kinded Types types can help increase the flexibility of our code and reduce duplication.
In this post we will see how Thunks and Trampolines can help solve problems by converting deep stack-based recursion into heap-based iteration helping to prevent StackOverflowErrors