> BTW, many people complain about syntax with significant whitespace, and still 
> use whitespace to indent code in blocks, denoted with some parenthesis...

Not speaking for V's author, but if I was the one making the claim he made I 
don't think it would be related to indentation at all. Everything has its pros 
and cons, but I can think of more pros and less cons for lack of significant 
whitespace than for significant. In this case the pros of one are the cons of 
the other.

A language with block delimiters **can** actually improve readability, since it 
gives you near total freedom to decide how the code is visually organized. It's 
obviously down to you to not make an even bigger mess of it, though.

For some people having the braces delimiting stuff helps their eyes make things 
out better. We all have different ways of interpreting what we see, and we're 
all used to different paradigms. When I first started using python, I found it 
visually confusing. I was coming from C++ and Haxe.

In some cases I find it useful to economize on vertical space (because monitors 
are wide, not tall). So for example, when you have a big switch/case or a bunch 
of if/else ifs, sometimes you can pack each of them into one line, so it all 
fits on the screen, and also so that you can easily edit several lines at once. 
You can't do this in python if you have more than two expressions inside the 
if. (I never tried it in Nim.)

It's also useful for cases where you need to temporarily comment out a loop's 
header or an if's condition, such that you don't have to waste any time 
rearranging the indentation of the code block that was in it to make the 
compiler happy.

On the other hand, significant whitespace means a bit less typing, and maybe on 
the whole it may end up economizing on the vertical space more. I can't think 
of any other advantages.

(I guess how important vertical space is to you will depend on how big the font 
you use is.)

Reply via email to