3 ms·
visual cleanliness is not just about whitespace. There are other considerations like how well the clauses stand out: If x > 0 Then y = 3 Else
by niggler 14y ago
visual cleanliness is not just about whitespace. There are other considerations like how well the clauses stand out:
If x > 0 Then
y = 3
Else
y = 4
End If
is much easier to scan than
if x > 0:
y = 3
else:
y = 4
Even though there are more characters in the vb side, the fact that the blocks are explicitly ended give you a much better mental cue than merely shifting the whitespace indentation
- cturner 14y agoIt's probably subjective. I've always found capitalisation makes scanning harder. VB was one of my early languages, and I recall trying to find a way to turn off VB capitalisation way-back-when when I was developing in it. But it might be odd to me. Whenever I see a directory of C with a CVS directory, I feel a brief tension from all the shouting.
- RyanMcGreal 14y agoI used to program in VB/VBA and switched to Python several years ago. As the other person who replied notes, 'visual cleanliness' is subjective, but I vastly prefer looking at Python to looking at VB/VBA, and I immediately began to prefer it on learning Python, despite having programmed in VB for several years previous. Part of it is that you can communicate the same information with fewer tokens and in less space. My eyes don't have to jump around as much to figure out what's going on.