Monoids: what they are, why they are useful, and what they teach us about software

Monoids are a pretty interesting concept in software development. Monoids are everywhere. Monoids are simple yet powerful. And Monoids have a lot to teach us about software, in particular about composition and building powerful abstraction. This post will take you through a small tour of what Monoids are and are for. We will first define... Continue Reading →

A follow up of the study of 4 Money class designs: why not having currencies as type parameters?

In the previous post, we went through a comparative study of 4 different designs for a Money class that represents an amount of money. To do so, the Money class groups an amount with a currency (its unit) and implements a safe arithmetic which takes into account the currencies. This article received a quite positive... Continue Reading →

Hexagonal Architecture and Free Monad: Two related design patterns?

Disclaimer: You do not need to understand Monads to follow this post. This is not a Monad tutorial either, but it might help you getting some intuition on what is a Monad. Some knowledge of Haskell and C++ might help but are not pre-requisite.   There is a lot of talk about Domain Driven Design... Continue Reading →

Catamorph your DSL: C++ Port

In the previous posts, we went over the process of building a DSL for arithmetic operations and we introduced the concept of Catamorphism as a way to decouple the traversal of the AST from the operations we want to perform on it. We saw how it could help us compose operations before traversing the AST... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: