Comment by eviks
8 hours ago
> a lighter color than code and easy to skip over.
How does color and the ease of skipping address the fact that you don't see code because it's pushed off screen? Especially compared to the ease of skipping when you wrap the whole paragraph of comments into a single long line when you don't need to read it.
> And maybe a nice docstring that summarizes its purpose. Which you could just as well have right there where you read the block.
The nice name/signature yes, that can be situationally better
There’s place where you can break the code before 100 or even 80 line limit. And the only reason that you cannot do so with code is excessive indentation (nested scope). Which you will find easily in very long functions.
> Which you could just as well have right there where you read the block.
A function forces encapsulation and make explicit the external factors. A block doesn’t make clear which variables in the parent scope it’s using or if everything in the block is one logical step.