in reply to The classical TAB issue

Decades of programming practise hasn't been able to settle this matter. There are just two rules you should follow: use whatever makes you feel comfortable, and second be consistent. Don't take a maintainance programmer into consideration unless you actually write code that someone will inherit. But even then, whatever you do, someone else will do differently. The maintainance programmer must adapt - that's why (s)he's a maintanance programmer. Just don't use extremes. An indent of 0 or 1 is too small. More than 8 is overdoing it. But 2 to 8 is used (well, perhaps with the exception of 7).

Personally, I tend to use a 4 character indend for languages that use braces to delimit blocks, and 5 characters that uses keywords to end blocks. But I've used a 2 character indent for more than a decade as well.

As for <TAB>s, <TAB>s have their place. That's "place", singular, not "places", plural. The place for <TAB>s is called Makefile.

Abigail

Replies are listed 'Best First'.
Re: Re: The classical TAB issue
by jryan (Vicar) on Apr 06, 2004 at 19:10 UTC
    As for <TAB>s, <TAB>s have their place. That's "place", singular, not "places", plural. The place for <TAB>s is called Makefile.

    And, there's something interesting about that, too! I've met Stu Feldman, the original author of make, and when I asked him about the tab thing, he told me that he never intended for it to be the case. It turns out that by the time he realized his accident, he already had about a dozen people using make, and he made the decision just to keep the tabs because he didn't want to break any existing Makefiles. Now, he's been hearing hell about it ever since. :)

Re: Re: The classical TAB issue
by hardburn (Abbot) on Apr 06, 2004 at 17:34 UTC

    Decades of programming practise hasn't been able to settle this matter.

    Hey, RPG programmers solved it years ago! Then they unsolved it by introducing Free Form. I'd like to officially welcome all the old RPG programmers out there to the wonderful world of tabstop flamefests.

    (Languages meant for punchcards)--

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

      Don't know if I count as an RPG programmer; I can neither read nor write it, but have had to do bug fixes in it in the past :(

      It seemed to me like a bizarre cross between a fourth generation language and assembler.

        Like I said, it's meant for punchcards. I could see how a column-oreinted desgin (where certain identifiers must fit on a certain column of text) would make sense on a punchcard, but it should have been chucked out at the introduction of on-screen editors. On the upside, you can probably parse it easily with unpack.

        ----
        : () { :|:& };:

        Note: All code is untested, unless otherwise stated