4 ms·
Sorry you're right. It's 5 lines: https://robots.thoughtbot.com/sandi-metz-rules-for-developers https://robots.thoughtbot.com/sandi-metz-rules-for-developer...
by tinco 11y ago
Sorry you're right. It's 5 lines:
https://robots.thoughtbot.com/sandi-metz-rules-for-developers https://robots.thoughtbot.com/sandi-metz-rules-for-developer...
- azth 11y agoFor certain web apps, maybe that can work. Not for anything slightly more complex though.
- odonnellryan 11y agoNeeding to be longer than five lines? What's your limit? I can see some view functions being a bit more, but that's boilerplate. A function should do one thing. It's really, really hard to do one thing in more than a few lines.
- azth 11y agoJust take a look at any OS/graphics/machine learning/etc. codebase.
- odonnellryan 11y agoOkay, I have. I haven't seen any code that could not be refactored to be clearer and shorter. Not being a dick, but five lines is a lot.
- azth 11y agoWhat about any of the functions here: https://golang.org/src/sort/sort.go https://golang.org/src/sort/sort.go e.g. symMerge(), quickSort(), etc.