Python-like tabs instead of curley brackets?

Pragma ericanderton at yahoo.removeme.com
Thu Nov 30 13:51:31 PST 2006


Mark Wrenn wrote:
> On Thu, 30 Nov 2006 03:56:39 +0100, Witold Baryluk wrote:
> 
>> Dnia Fri, 27 Oct 2006 12:15:48 +0000 (UTC)
>> Charles Fox <charles at SPAMMENOT.robots.ox.ac.uk> napisał/a:
>>
>>> I've been following D for a few years now, and I'd like to suggest
>>> ditching the (now completely redundant) curley brackets from the
>>> C-like syntax and borrowing Python's use of tabs to replace them.   I
>>> see no reason to keep the curley brackets now we have nice editors
>>> that know about (and can display) tab characters.  The ideal
>>> programming language should have no redundancy, you shouldn't have to
>>> say anything twice, and at present we are still repearting ourselves
>>> with both curley brackets and indentation!  What do you think?
>> Hi all.
>>
>> Try this:
>> http://smp.if.uj.edu.pl/~baryluk/d/dmt-1.0.tar.gz
>>
>> Note: not tested well (it is very simple and naive, but can be used for
>> tests. but to be usefull some issues should be resolved in future).
> 
> 
> I must be old :)  I have to say that I like the C style brackets.  I'll
> catch you guys later at the old programmers home :)
> 
> Mark

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.

-- 
- EricAnderton at yahoo



More information about the Digitalmars-d mailing list