Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

100% agree and this not only concerns readability. The concept of "locality" turns out to be a fairly universal concept, which applies to human processes just as much as technical ones. Side-effects are the root of all evil.

You don't see a waiter taking orders from 1 person on a table, but rather go to a table and get orders from everybody sitting there.

And as for large methods, I find that they can be broken into smaller once just fine as long as you keep them side-effect free. Give them a clear name, a clear return value and now you have a good model for the underlying problem you are solving. Looking up the actual definition is just looking at implementation details.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: