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

While I do like linear code the bigger problem is that everything is in scope. If you break it apart into separate functions you can clearly see the inputs and outputs.


Right, you can read both but it also requires more brain power to separate out when not in separate functions. It's also easier to unit test as the code grows larger.


this - this is the reason. Large functions accrue state and state begets bugs over time.




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

Search: