Comment

Comment by rza

> "...immediately realize that which will make it more difficult to modify these functions". Please clarify what you mean here.

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.

parent rza 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton