DEV Community

Discussion on: Understanding the Object-Oriented Programming

Collapse
 
havespacesuit profile image
Eric Sundquist

I've been reading Clean Code by Robert Martin and trying to wrestle with some of this. He suggests limiting your function arguments to as few as possible (3 being about the most he will tolerate), and letting a lot of the other variables live in class instance properties.

It makes a lot of sense for OOP, but the FP project I work on has sometimes huge argument lists, as we are trying to prevent global scope and limit what the function itself is responsible for.

Something I'm still trying to work out how to fix... OOP is definitely tempting me, though it would be a herculean task to convert parts of our code base at this point.