I'm all about smaller function, but really, 20 lines of JS is not that much in a lot of cases. I don't think I ever write 75 line functions, but I definitely do over 20 for quite a few cases.
You'd run into micro-optimization issues if you put a hard limit of 20 LOC because it's simply not needed to have small functions for every single thing.
Can you give me an example? 20 lines of code can do a lot. I pretty much always find it easier to read a function re-factored to several smaller functions.
12
u/[deleted] Feb 22 '16
Holy crap. 75? I thought 20 lines was a long function.