I very much enjoy the functional programming paradigm, but I am still not sure how to go about designing a small/medium project with it.
When using OO, I have a set of labelled entities (classes) with clearly defined boundaries. I can reason about stuff like:
- what is this class doing?
- should I put this code inside or outside a class?
- should I split this class in two?
- how would a client like to use this class?
So one big benefit of classes is that they provide boundaries for a piece of functionality. I find that this helps a lot when designing an application.
In functional programming, everything seems to be about composing and abstracting functions and data structures. Type classes in haskell are mainly there to offer polymorphism. Same for prototypes in clojure.
When designing an application written in a functional style, what is a good "unit of feature" one can define, label, and reason about?