Frameworks and Libraries: The role of multiple dispatch

That’s an interesting discussion and thanks for the links.
Adding my two cents … it’s my impression that languages with a stronger focus on functional programming tend towards libraries, e.g., web stacks in Clojure, whereas OOP seems to favour frameworks. Maybe because objects already have a live-cycle and so its natural that the whole application has one as well. Furthermore, functional abstractions compose better … not sure if multiple dispatch is really needed here (probably does not hurt though), but ad-hoc polymorphism of functions, i.e., independent of objects, is certainly a win. Haskell gets a lot of mileage from its type classes and very generic abstractions such as Functor, Monad build around them.
I also believe that there is a huge political issue involved – maybe more important than technical issues – in that companies want frameworks. Giving them the opportunity to build communities, eco-systems around their products once users are hooked, thereby creating strong vendor lock-in. Especially the last post you linked has several related remarks and vividly calls this “fanboism”.

4 Likes