There have been scientific studies that have proved that the human brain is significantly more capable of managing linear relationships than _any_ other type of relationship.
Sequential is easiest to understand.
Then my brain appears to me non human. And I brought friends with me (from where ever we came, I don't remember)...
As I said, human brains have overcome page turning in books. Which according to how you preset your argument makes books really hard to understand, and we should still have scrolls...
Jump to declaration is to me way less an effort than turning a page in a book. The computer does it for me. I just continue reading.
What does break the sequence in the code is every single loop, and every conditional. But that dose not get worse by creating functions. In fact the containment makes it easier, because their bounds now must be within each function making the search for the non sequential upper bound so much easier.
But I am repeating myself, and you ignored that already. So I guess its pointless. Especially since now that I repeated it, it isnt sequelized anymore.
But to add something I haven't said.
Taking unrelated sub tasks into their own functions => improves the sequentiality of the actual related parts that are the remaining code. When I now read that code, I only need to read one function call. That is the same than your proposed comment. But it saves me from having to skip (jump / non sequel) over the code that was explained by the comment.
So according to your statement: using functions makes code easier to readYes, I did see: you use code folding instead => for me that is extra work, having to open or close fold (depending on what they currently are).
Also, if you ever have any of them folded then that conflicts with you earlier statement that you never trust the function-name (or comment) but that you always read the entire code to check the implementation (something I only do, if I don't know the code yet, because once I have done it, I do trust myself)
The moment linear sequences are broken into pieces they are no longer sequential because it cannot be known just by looking at the pieces what sequence they belong in.
Have you ever tried to follow a recipe to cook something. Imagine if it read like this
Take 3 grams of sugar. To measure 3 grams of sugar get your scales and a container. Measure the weight of the empty container. .....
Must be real fun to follow that recipe. But it is strictly sequel.... So perfect for you.
The longest function I've ever written exceeded 27,000 lines. It was a case statement. Breaking each case into a separate function would have converted a very easy to follow and understand program into a jigsaw puzzle (it would have been completely absurd to do that.)
And when you read it, all of it, entirely without skipping anything... I assume you do speed reading so it didn't take to long....
But when you reached around line 26900, did you still recall the exact content of every earlier line you read?
I don't know that code, and it may have good reasons (or not) to stay together. That is not the point. But it does not act as an argument that other code should never be divided appropriately into functions. That is of course unless you indeed can recall all 27000 lines after reading them.
You yourself say "certain atomic tasks"... Though earlier examples of yours show that you rejected the idea for some task that by their description would each be atomic.... But maybe those description were misleading...
In any case: please remember I never suggested, not even hinted, that size is used as reason to split something. I always have said that creating function is purely done by code having a distinguishable, clearly defined, and different from the rest, task.
The mention of size that I made was that in my experience by doing so, bigger functions (like 1000 lines) become rare. They still exist, but very rare.
Size is not the cause. Size is merely a side effect.I am just stating that, because the way you present your "arguments" does leave some uncertainty if you take this into account. Maybe you do, maybe not... Can't tell.