Delight

Charles Hixson charleshixsn at earthlink.net
Thu Sep 25 13:26:02 PDT 2008


Bill Baxter wrote:
> On Fri, Sep 26, 2008 at 4:24 AM, Charles Hixson 
> <charleshixsn at earthlink.net <mailto:charleshixsn at earthlink.net>> wrote:
>  > bearophile wrote:
>  >>
>  >> Sergey Gromov:
>  >>>
>  >>> I'd like to look at some real-world example written in Delight.
>  >>
>  >> I have not tried to run it yet because it's for Linux for now.
>  >>
>  >>
>  >>> I'm afraid that the lack of global state will result in either a huge
>  >>> amount of arguments passed to every function or huge ad-hoc interfaces
>  >>> grouping other interfaces just to pass some functionality up-stream.
>  >>
>  >> I agree, that's one of the main things I think have to be fixed in
>  >> Delight, having global vars (and maybe a global main function too).
>  >>
>  >> The other main problem comes from the tabs as indents, this explains why
>  >> it's bad:
>  >> http://mail.python.org/pipermail/python-list/2003-January/183758.html
>  >>
>  >> There are other problems in Delight, but I think they are minor.
>  >>
>  >> There's a (for me) surprisingly large discussion on Reddit about 
> Delight,
>  >> 82 comments so far:
>  >> http://www.reddit.com/r/programming/comments/73d15/d_meets_python/
>  >>
>  >> Bye,
>  >> bearophile
>  >
>  > I disagree.  I always use tabs.  This allows me to adjust the indentation
>  > width on the fly and as needed, which spaces would not allow.
> 
> Did you even read the doc Bearophile posted?  If so try rebutting the 
> arguments there. That point is specifically addressed in the thing he 
> linked to.
> 
> --bb
OK, I'll try to do it point by point.  (I first read this years ago when 
it came out on the python list.)
1) >> All tabs works fine regardless of editor tab stops. All spaces works
 >> fine. Mixed spaces and tabs is deadly.
Agreed.

2) So is the use of tabs in certain contexts; in particular any attempt
 > to e-mail a python source to someone using Outlook Express. OE
 > has this nasty habit of ignoring leading tabs.
Sorry, I'm not going to let MS shape my preferences.  Nor some other 
silly editors that also automatically convert tabs to spaces, not other 
silly editors that presume that a tab must equal 8 spaces.

3) long example is mixing tabs and spaces by invoking two different 
programmers.  This is, indeed, bad, but tabs and spaces are equally 
good/bad in this context.  (And yes, I've been bitten...and due to that 
I really despise spaces as linguistic separators.)

4) "The second argument (tabs mean everyone can use their favorite
indentation) sounds nice at first, but simply doesn't work in the real
world. It inevitably, and I do mean *inevitably*, leads to ugly
space-tab mixing. Even code written by only one author using one text
editor won't be able to avoid it!"
Now that's *REALLY* stupid and false to boot.  I only ever use spaces 
when I'm reformatting my code for use externally, and that's just 
because of people/applications who are equally .... I can't think of a 
polite adjective that's accurate.

5) "I don't like tab characters. I wish they would go away ..."
That's his only real argument, but at least he's eventually honest 
enough to come out with it.

--------------------------------------------------------
As I said, I first read this years ago.  Since that time my opinions on 
the matter have become more convinced.  I have never seen any evidence 
that on honest examination didn't boil down to "I don't like tabs".  So 
I kludge when I must exchange code with such people/applications, and 
when I receive code that uses space for indentation, I laboriously 
remedy the problem.  But I don't think there was was better.  (Actually, 
it's not usually all that laborious, but it's extra work that I despise 
having to do.)


More information about the Digitalmars-d-announce mailing list