3 ms·
I've heard this called "lasagna code". I've definitely drifted towards longer code, if nothing in that function is used elsewhere. Some tasks really are just l
by nomel 2mo ago
I've heard this called "lasagna code".
I've definitely drifted towards longer code, if nothing in that function is used elsewhere. Some tasks really are just lists of things to do (especially in something like image processing), and I think that sometimes it doesn't make sense to put lists of lists in your list of things to do.
- xnzakg 2mo agoBut in many cases, you could split it up into smaller, `inline` functions.
- nomel 2mo agoYes, you can redirect the reader eyes elsewhere as many times as you like. That's the beauty of lasagna. There's a happy medium though. I've seen some people say "functions shouldn't be over 10 lines", which makes code, like I'm describing, near impossible to comprehend, requiring nonsensical divisions of work.