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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.