Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I understand your frustration. However, I'll suggest that you use 8-space indentation with *spaces* not *tabs*. That way, regardless of my editor settings for tab width, I'll see that your style is 8-space indentation and (as a good contributor) can follow that easily. Whereas if my tab-width is set to 4 or 2, then I'll never know that you want 8 spaces and you're more likely to get something inconsistent back (particularly if I'm trying to line things up across multiple lines at something that *isn't* a

    • I understand your frustration. However, I'll suggest that you use 8-space indentation with *spaces* not *tabs*. That way, regardless of my editor settings for tab width, I'll see that your style is 8-space indentation and (as a good contributor) can follow that easily. Whereas if my tab-width is set to 4 or 2, then I'll never know that you want 8 spaces and you're more likely to get something inconsistent back (particularly if I'm trying to line things up across multiple lines at something that *isn't* a 8-space tab multiple.)

      But this is not a problem if you follow the simple rule that you use tabs only for the lefthand indenting. If you need to line things up over multiple lines somehow such that this would break, then do not use tabs, use spaces.

      • Yes, in an ideal world I would and so would everyone else. Unfortunately, it's not an ideal world and when multiple people contribute to something, it's possible that someone won't follow that guideline.

        My point was that using only spaces will (a) be more apparent to contributors that 8-space indentation is desired and (b) be more robust to fix when someone intentionally or inadvertently mixes tabs and spaces.

        • be more apparent to contributors that 8-space indentation is desired

          Why should they care? No one needs to know. As long as everyone sticks to the rule that tabs are for indentation and only tabs are for indentation, tab width is completely irrelevant. Which is the whole point of using tabs at all.

          • First, to clarify -- I mean that 8-character wide indentation is desired (by Alias in this case).

            As long as everyone sticks to the rule

            But they don't (or Alias wouldn't be so annoyed).

            My point about using spaces over tabs is that it will be more immediately obvious to anyone opening a file what the author's desired indention width is.

            You may not like it -- you may think "what an idiot, using 8-space indentation instead of tabs!" but at least you'll notice. Or, if you should happen to use tabs at w

            • > My point about using spaces over tabs is that it will be more immediately obvious to anyone opening a file what the author's desired indention width is.

              Only if every author does it!

              If you use 8-spaces, and I use 8-character tabs, and I open up your code, I probably won't notice and just use tabs anyway.

              So know you'll still have spaces and tabs mixed...

              • And then when I get the patch or sync from subversion, I can s/\t/ /g and I'm done.

                • That should have been 8 spaces, but the HTML rendering compressed it, of course.

                  • (Here’s an   just for you. ;-) )

                    • Thanks. I'm spoiled by <code> on Perlmonks where it DWIW whereas here it just changes the font. <ecode> works here, but forces a new block instead of doing it inline.