F# – Use Discriminated Unions instead of class hierarchies
When you consider the age old problem of representing different shapes (circle, triangle, square, rectangle, etc.) my OO fed developer brain naturally jumps to a class hierarchy along the line of: This is perfectly fine and legit, but it’s not the only way to approach things. Since I’ve been on a more varied diet of …
F# – Use Discriminated Unions instead of class hierarchies Read More »