Python-like tabs instead of curley brackets?

Daniel Giddings dgiddings at bigworldtech.com
Thu Nov 30 14:19:07 PST 2006


Get an editor that understands Python ;-) Most will either use whatever 
that code block uses, or highlight the problem indentation in bright red.

Personally I much prefer the Python way of doing indentation, after all 
you indent your code anyway making the curly braces somewhat redundant 
(and I program about equally in C/C++ and Python).

:-) Dan

Pragma wrote:
> 
> Put me in the "old" camp too I guess.
> 
> I've posted before about this, but I still think it bears repeating why 
> this isn't a good idea for D.
> 
> I've been doing some Trac hacking lately so I've come to despise 
> Python's whitespace scheme.  Oh sure, it makes for some nice looking 
> code, but in the end, my code fails compilation after compilation just 
> because I mashed the [tab] key (instead of four spaces) by mistake.
> 
> Recently, I showed an example to my wife (who's not a programmer BTW) of 
> two lines of python code:
> 
>     print('hello world')
>     print('hello world')
> 
> I then told her that "one of those lines is 100% valid code, and the 
> other isn't."  I added that "the bad line will stop my program dead in 
> it's tracks, even though I double checked my work, just as we did.  The 
> difference is one has four spaces and the other a [tab] character."  Her 
> response?
> 
> "Wow, that's pretty lame."
> 
> If the design failure here is easily grasped by someone, who's entire 
> "coding" experience can be summed up in using LiveJournal and MySpace 
> daily, then something is very, very wrong.
> 



More information about the Digitalmars-d mailing list