Should I extract specific functionality into a function and why?
- by john smith optional
I have a large method which does 3 tasks, each of them can be extracted into a separate function. If I'll make an additional functions for each of that tasks, will it make my code better or worse and why?
Edit:
Obviously, it'll make less lines of code in the main function, but there'll be additional function declarations, so my class will have additional methods, which I believe isn't good, because it'll make the class more complex.
Edit2:
Should I do that before I wrote all the code or should I leave it until everything is done and then extract functions?