in reply to The classical TAB issue

Personally, I use 3 spaces for block indentation. The majority of Perl code I've seen has used either 4 spaces or some aweful combination of varying indentation. I just prefer 3 spaces because it shows the level of indentation just as well as 4 spaces, but requires that one less keystroke per indentation. I honestly don't see how people can stand using 8 spaces (not to be confused with an 8 space tabstop). I could not see myself banging in an additional 8 spacebar presses every time I enter a new block, as by the time you're in a 4th level block, you're punching in 32 spaces for each line of code and taking up 40% of the screen width (assuming 80 character width terminal) just for the whitespace. I have to wonder if there aren't code samples out there that use 8-space indentation that contain more whitespace characters than non-whitespace ones. Talk about a waste of bandwidth and storage space.

As for using tabs rather than spaces, I despise that all to hell. Tabs are even worse than 8 space indentation because of cross-editor type behaviour. Ugh! Who invented the damn tab key anyhow? It should be deprecated, except for tabbing between window elements :)

Replies are listed 'Best First'.
Re: Re: The classical TAB issue
by hardburn (Abbot) on Apr 07, 2004 at 13:28 UTC

    I honestly don't see how people can stand using 8 spaces (not to be confused with an 8 space tabstop).

    Many people who put in 8 spaces (not a literal \t) have their editor do it for them. Either the editor autoindents, or they press the tab key and 8 spaces are put in.

    As for using tabs rather than spaces, I despise that all to hell.

    The orginal reason for a \t is that memory used to be much smaller, so using one character instead of four or eight made a big difference. With 500 GB hard drives, this is no longer an issue.

    The modern reason for using a literal \t is that when it's done right, you can get it to look right with most reasonable editor/terminal settings. See one of my other posts in this thread for tricks to do this.

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

    Note: All code is untested, unless otherwise stated