in reply to RE: On Testing and Formatting Code
in thread On Testing and Formatting Code

Were you working closely with me I would be unhappy about the non-standard tab-stop.

I leave editors at the default 8 spaces. Your code would probably not display nicely for me in 80 columns and I would request that you change your settings to make sure your tabs become spaces in the file. I don't care what happens on your screen when you hit tab. I do care that the output is readable for me, prints properly, etc. And since others use editors with 8-space tab-stops, I am not going to be sympathetic to changing to match what you are doing...

Oh, and the first time you open and touch some Python code? You will turn it into a complete and utter mess! Seriously, Python uses indenting for its logical structure, and non-standard tabstops can result in your not being able to read it, and then it's not being able to read it either after you make a trivial edit and spaces are converted to tabs (or vica versa)!

  • Comment on RE (tilly) 2: On Testing and Formatting Code

Replies are listed 'Best First'.
RE: RE (tilly) 2: On Testing and Formatting Code
by extremely (Priest) on Oct 06, 2000 at 06:09 UTC
    No, you read that wrong. My editor leaves tabs as tabs. In code I write for work I NEVER EVER use spaces. I set my EDITOR to use 3 space representation. Most people here leave theirs set to 4 or 8. But they are free to use what ever they like. My Python code works great. Every tab is a level and it prints beautifully, compact and clean. Better still, since it's all tabs, any goofus who wants can smash tabs to 8 spaces and further fsck it up at will.

    The porpoise of the odd fish "tab" is to indent, with flexibility of representation. That it is abused into spacing to ($col + 8 - ($col % 8)) is just a shame.

    Rewriting you last paragraph (no offence here I'm trying not to devolve into ad hominem attacks) :
    Oh, and the first time you open and touch some Fortran code? You will turn it into a complete and utter mess! Seriously, Fortran uses indenting for its logical structure, and non-standard tabstops can result in your not being able to compile it, and then it's not being able to read it either after you make a trivial edit and spaces are converted to tabs (or vise-versa)!

    So what? We weren't talking python here and why should I care if my Perl habits might cause me trouble editing Python? You don't see me decrying your Perl habits inflicting woe upon your writing paragraphs of off topic-ness. Why not? Because you don't blindly type a "$" or "@" in front of every noun and tell people to precede their documents with "use grammar;". I, and you clearly, are able to keep more than one way of formatting and describing information straight. Please don't mis-read what I say " I ALWAYS use tabs IRL and tend to have my vim set to 3space tabs." and then call me ignorant to my face.

    Sorry if this came off too heated tilly. I didn't mean it to insult you but who are you to chide me? Especially with the specious "wait till you hit Python" argument.

    --
    $you = new YOU;
    honk() if $you->love(perl)