File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,11 @@ If the function has a single responsibility, consider if you can bundle
380380some or all parameters into a specialized object that will be passed as an
381381argument to the function. These parameters might be attributes of a single
382382entity that you can represent with a dedicated data structure. You may also
383- be able to reuse this entity elsewhere in your program.
383+ be able to reuse this entity elsewhere in your program. The reason why this is
384+ a better arrangement is than having multiple parameters is that we may be able
385+ to move some computations, done with those parameters inside the
386+ function, into methods belonging to the new object, therefore reducing the
387+ complexity of the function.
384388
385389** Bad:**
386390
You can’t perform that action at this time.
0 commit comments