OOP languages don’t lack reusability; they lack compactness because of the gorilla/jungle problem. Do not conflate the two.

Functional programming also suffer from the gorilla/jungle problem. Pure functions do not necessarily exist in isolation from all other functions in a program. In nearly all FP languages, functions are grouped together in modules. So if, for example, you compose two functions from two different modules, you pull in extraneous functions that may not ever be called.

Moreover, speaking for Smalltalk, you can prepare an application for deployment by pruning all the unused classes, thus making your application quite compact.

One important thing to remember is that object-oriented programming supports reusability in two different ways: 1) composition or aggregation; 2) inheritance. With #1, there is no “jungle.”

Inheritance may not be appropriate for all situations. You choose composition where it makes more sense. Many applications have shallow class hierarchies for this reason.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store