3 ms·
I think that functions should be small & minimal to no side effects & trustworthy. That way you can see something like "layout.window_title(title)" and not nee
by fouc 8y ago
I think that functions should be small & minimal to no side effects & trustworthy. That way you can see something like "layout.window_title(title)" and not need to go read that code because it's not necessary - unless you were specifically making a change in that area. Even if it can make debugging slightly trickier with the extra tree traversals, it also makes debugging easier at the same time because the logic is more compartmentalized and you don't have to read nearly as much code to solve the issue.