Re:Do you use blank lines in your code?
by nitrogen on Saturday November 06, 2010 @07:11PM
(#1878013)
Maybe different philosophies apply to newer languages, but I've heard it said that in C your main functions should be more than just a list of function calls, and a function should only be extracted if it's either impossible to read otherwise, or used more than once. Maybe that's less important now that function call overhead is minimal compared to everything else.
I will note, however, that function call overhead still adds up. Qt4 on GNOME is significantly slower delivering events than it needs to be, as every single call stack is over 50 methods deep.
I definitely think it improves readability to break up these chunks of functionality. The problem, though, is I can't think of a good example that I don't think will have someone tell me to put them in two different methods...