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

Paulo Pinto pjmlp at progtools.org
Tue Jan 15 05:37:22 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).
>
>
>> and the fact that one missing white space (a typo after 
>> deleting a line) screws up the whole script is just annoying.
>
> It's a small price to pay for increased code readability. And 
> if I see one missing white space in D code, I fix it right now, 
> so there is not a lot of difference.
>
>
>> The Python indentation terror is a peculiar personal 
>> preference enshrined in the language's syntax. It's simply not 
>> my style.
>
> 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


Although Python gets bashed a lot due to this issue, it is not 
the only language doing that. Haskell, OCaml and F# have similar 
rules.


More information about the Digitalmars-d-announce mailing list