in reply to Tabs vs Spaces lets give this a go

Personally, I don't agree with you. I agree more with TheDamian and Grandfather. Honestly though, I developed the preference for spaces so long ago that I've forgotten exactly why I prefer spaces to tabs.

However, you present your ideas pretty clearly and logically and made me examine my own thinking on the subject, so I upvoted you.

And I raised this discussion on IRC, where I think the main idea is this: overall (and not just this particular topic) PBP recommends picking a convention and sticking with it. If you share his preference for spaces, awesome for you. If you prefer tabs, just make sure your whole organization does too. :)



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Replies are listed 'Best First'.
Re^2: Tabs vs Spaces lets give this a go
by monarch (Priest) on Oct 08, 2006 at 22:20 UTC
    I, too, had forgotton why I had firmly moved into the anti-tab / pro-space division until last week.

    I was given the task to maintain a piece of software. As any good software engineer would do I kept to the original conventions of this software; as much as I don't like tab-indented code I continued to use tab indents to maximise maintainability of this particular piece of code and to minimise the diffs when checking in changes.

    Unfortunately I got my editor to tabify my section of the code (as I use space indent by default). The trouble with that is that it converted a string of 8 spaces "        " into "\t". Lucky for me we had automated tests that flushed this problem out!

    To protect myself against this kind of thing I've kinda resolved personally to encode spaces in strings as "\x20".

    But don't be fooled.. tabifying code is horribly inconsistent and prone to much danger. It's bad.

A reply falls below the community's threshold of quality. You may see it by logging in.