|
![](/i/fill.gif) |
> (1) look at the "}";
> (2) move your focus to the white space preceding it;
> (3) move your focus up over WHITE space until you see
> BLACK;
> (4) you are looking at the keyword!
This is not as easy with several nested code blocks. If there's a lot if
white space at *both* sides of the column you are looking at, it can be more
difficult to see which of the lines is at the same indentation level as the }.
> /* typical Pascal indentation */
> if Condition then begin
> DoThis
> DoThat end
> else begin
> DoOther
> DoMore end;
> Perfectly aligned AND readable, isn't it? :))
Nope. The indentation is not logical. Some blocks are indented with 2 spaces
and others with 4 spaces. There's no consistency. The 'else' is not inside
of the 'if' block, but is at the same level, thus indenting it more than the
'if' is ilogical.
With a simple example there's no confusion, but make 4 nested if-then-elses
and it begins to be quite a lot more confusing.
Indentation should be logical, consistent and easy to understand.
Indenting one thing in one way and another thing in another way, and
specially indenting in a way that several nested blocks make the code
confusing is not good.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |