4 ms·
That would make sense if you were executing code in your head, but if you're reading you want to read all of it anyway...
by ricardobeat 14y ago
That would make sense if you were executing code in your head, but if you're reading you want to read all of it anyway...
- epidemian 14y agoBut @OriginalSyn has a pont. If you are reading code because something is misbehaving on a given configuration and you read if (some condition that doesn't hold on that configuration) ... You can avoid everything inside that if statement if you know that's not important for the case you're considering.
- mayanksinghal 14y agoBut if we want to avoid it, we would be required to already know what's inside the parenthesis. If we already knew what's inside it, putting condition before helps more as in that case (1) Either it's true and you have to parse the block or (2) It's false and you just jump to the end of it.
- Jare 14y agoNot at all true, most of the time you are reading code with a specific goal or area of interest in mind, and thus are only interested in the subset of code related to that purpose.