Hacker News new | ask | show | jobs
by apocolyps6 697 days ago
I suspect that number comes from this quote a little further down

> Every function in this program was just two, or three, or four lines long. Each was transparently obvious. Each told a story. And each led you to the next in a compelling order. That’s how short your functions should be!

1 comments

Thanks for pulling the quote. I agree. It is a distinction of "should be" and must be". FWIW: Uncle Bob clarified this exact topic in a recent youtube interview with Primeagen (about 5 months ago). The gist is if the length to have a single cohesive function is 50 lines, then so be it. It was clarified that clean code does not give a hard and fast limit (but does give a very weighty recommendation to go for small functions based on a number of heuristics).