2 ms·
Not only meaning, but also separation. Two chunks of code after each other in a method can communicate via all kinds of mechanisms, e.g. having the same variab
by eru 14y ago
Not only meaning, but also separation. Two chunks of code after each other in a method can communicate via all kinds of mechanisms, e.g. having the same variable in scope. As a reader you will have to check for these communications to understand the method, even if those two blocks of code do not in fact communicate.
If you separate the block out into their own methods, they reader will have a much easier time verifying that they are decoupled.