rza
Joined 13 years ago
Karma
168
Submissions
72
Member since
Feb 11
Joined 13 years ago
[1] https://investor.google.com/corporate/certificate-of-incorpo...
[2] http://en.wikipedia.org/wiki/Delaware#Incorporation_in_Delaw...
I absolutely would prefer a method to look like:
def main():
SetUp()
try:
DoStuff()
except:
HandleErrors()
then a thousand-line god function. It encourages modularity, reduced state and scope (please ignore my example above which implies a lot of shared state:)), and every method should be well-named and do a single thing well. Maybe for super-sensitive realtime systems, this might cause a few necessary checks that we could ignore, but we are talking about readability here.Having to navigate between different methods is honestly a really lame excuse for sticking everything in one method. That's what IDE's, documentation, and good method names are for.