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

"Functions should always be short" is also one of those guidelines that people treat like a hard rule. There are occasions when a 100 line function is easier to read than 5 20 line functions, or god forbid 20 5 line functions.

Stop being overly dogmatic, it ALSO leads to worse code.



There are occasions => There are only rare occasions.




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

Search: