3 ms·
If I am at the end of a long code block in C# or JavaScript, I might see this: ...lots more code up here... return result; }
by kogus 7y ago
If I am at the end of a long code block in C# or JavaScript, I might see this:
...lots more code up here...
return result;
}
}
}
return -1;
}
What's that next-to-last "}" for? To find out, I need to scroll way up, and hope the code is properly indented, or use an IDE feature to collapse the block.
But with a Pascal-family language, it would be more like this:
...lots more code up here...
return result
End If
End Loop
End While
return -1
End Function
It is more verbose - but its verbosity with a purpose, and it helps me avoid the distracting question "What is ending here?".