If you want to follow along you can find the source code here. Step through the commits in the repository to see the steps presented in this article applied one after the other.
]]>I do most of my everyday programming in C++ or Python and this will be reflected in this article. I will discuss resource management in Haskell from the perspective of a C++ programmer.
]]>This post is motivated by a question that came up on Reddit. Namely, how can we merge multiple type-erased interfaces into one single interface. A similar question is also asked in the end of the first talk: How to apply type erasure to types with overlapping interfaces? The speaker’s answer is to simply repeat the common parts. I think there has to be a better way. So, in this post I am going to explore how to merge type-erased interfaces. But first, let’s quickly revise type-erasure.
]]>