--

That’s because in object-oriented programming, you decompose the problem into a vast network of cooperating classes. These classes expose their behaviour through their methods, which ideally are very short and simple. The methods call on other objects’ methods in collaborative fashion.

It’s not unlike functional programming where you decompose the problem into a vast collection of functions, which ideally shouldn’t be very long.

In procedural programming, developers tend to write large subroutines which reflect poor decomposition of the problem.

--

--

Responses (1)