in reply to Re^2: bloated 'if' formatting
in thread bloated 'if' formatting

That's a nice idea, but that would only work if windows aren't bounded horizontally. Think about it.

Suppose you are using a 4-character indent. You are using tabs for indentation, using a 4 character tabstop. Inside a subroutine you have an for loop, and inside its body you have a 66 character statement. On your screen, the line ends in column 74.

Now you give the code to someone who also uses 4 character wide indent, but he's using holding to the old mantra "don't change your tabstops" - his tabstops are 8 characters. Now the code he looks at not only has indents much wider than he's used to, the line that ended in column 74 on your screen will end in column 82 on his screen. Which, given a standard width of 80 characters means the code will be wrapped.

Tabs are evil, and tabstops other than 8 even more so. But if everyone is using tabstops of the same length, you might as well use spaces.

Perl --((8:>*

Replies are listed 'Best First'.
Re^4: bloated 'if' formatting
by BrowserUk (Patriarch) on Oct 07, 2005 at 10:52 UTC
    Which, given a standard width of 80 characters means the code will be wrapped.

    Geez. I last used an 80 character wide screen back around 1984. Auspicous year. That was an ADM 3+. Next I used a VT100 which handle 132. Around 1987, I moved over to a PC with a EGA screen that also handle 132. And after that a 3279G which could handle 4 48x132 sessions tiled.

    The last time I used a *nix system, it was remotely via PC-based terminal emulator and I frequently used SCREEN to run four terminal sessions in a window, and from memory each of those four tiled sessions was over 80 characters wide. When I ran one session full screen it was something 200 x 72.

    What is this fixation with the 1970s and 24x80?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.