A look at the D programming language by Ferdynand Górski

Chris wendlec at tcd.ie
Tue Jan 15 05:43:11 PST 2013


On Tuesday, 15 January 2013 at 12:36:42 UTC, bearophile wrote:
> Chris:
>
>> Nested for loops with if-statements can be hard on the eye in 
>> Python, because you have to go back an double check on which 
>> level you actually are
>
> If you use the standard 4 spaces indentations and you don't 
> have ten indentation levels this problem is not common. Some 
> persons also avoid your problem with an editor that shows thin 
> vertical lines every 4 spaces (but only where the lines are 
> actually reaching that length).
>
>

It happens very quickly if you have a class, a def, a nested for 
loop with one or two if statements

class:
     def:
         for:
             if:

You could call it "south west" code.


>
> Curiously the Python significant syntax was the motive for me 
> to start using Python in the first place, years ago. I was 
> looking right for that, being fed up of begin-end, curly 
> braces, and those code reading mistakes I was talking about.
>
> Bye,
> bearophile

It's simply not my style. I don't believe indentation should be a 
rule. I clean up my code in my own way.



More information about the Digitalmars-d-announce mailing list