So you're saying the problem with tabs is that you might get a document that only looks right, but in reality it's using tabs, so that's the problem with tabs? Did I miss something?
If you're gonna reformat a document using a syntax-aware editor, reformatting tabs to spaces is actually easier than spaces to a different number of spaces. In both cases you're messing up deltas in version control. Alexey ________________________________ From: Ricky Clarkson <[email protected]> To: [email protected] Sent: Wed, May 18, 2011 12:31:24 PM Subject: Re: [The Java Posse] Vs: Re: How many characters do you use for indention? It's easier to screw up formatting when incorporating code that uses tabs, because you might not realise it uses tabs. Only the person who uses a different tab size to your editor might realise. -- Skype: ricky_clarkson UK phone (forwards to Skype): 0161 408 5260 On Wed, May 18, 2011 at 1:26 PM, Alexey Zinger <[email protected]> wrote: Then there's no problem with tabs either. > > Alexey > > > > > ________________________________ From: Ricky Clarkson <[email protected]> >To: [email protected] >Sent: Wed, May 18, 2011 12:13:09 PM > >Subject: Re: [The Java Posse] Vs: Re: How many characters do you use for >indention? > > >It'll get reformatted. > > >-- >Skype: ricky_clarkson >UK phone (forwards to Skype): 0161 408 5260 > > > >On Wed, May 18, 2011 at 11:01 AM, Alexey Zinger <[email protected]> wrote: > >So what happens if you accept someone else's code, who was using the "wrong" >number of spaces for indent and mix it with your code? >> >> Alexey >> >> >> >> >> ________________________________ From: Ricky Clarkson <[email protected]> >>To: [email protected] >>Sent: Wed, May 18, 2011 6:44:06 AM >>Subject: Re: [The Java Posse] Vs: Re: How many characters do you use for >>indention? >> >> >>The problem is that if you, accidentally or otherwise, end up with a mixture >>of >>tabs and spaces for indentation, people with different tab sizes set see your >>code as spaghetti. >> >>It's easier to write a rule that detects and rejects tabs than it is to >>detect a >>bad mixture of tabs and spaces. In the latter, what would happen with: >> >>< tab >int[] x = {1, 2, 3, 4, 5, >>< tab > 6, 7, 8, 9, 10}; >> >>-- >>Skype: ricky_clarkson >>UK phone (forwards to Skype): 0161 408 5260 >> >> >> >>On Wed, May 18, 2011 at 6:45 AM, Roland Tepp <[email protected]> wrote: >>> At the risk of causing some whitespace holy war, I would actually secont >>> that sentiment. >>> >>> I am actually rather surprised at the level of dislike for a tab character >>> among this crowd, because this tab character fits really well into the >>> semantics of nesting/indentation. You can express a level of indentation >>> with a single character and adjust the actual visual representation of the >>> indentation depth at the editor/IDE level. >>> >>> Also - if everyone used tab for indentation, it would open up elastic >>> tabstops and opening up. >>> Also, to throw it out here, I just stumbled upon a pretty neat idea talking >>> about sidestepping the whole tabs vs spaces discussion by using a word >>> processor for writing code instead. Quite bold proposal, I would say... >>> >>> kolmapäev, 18. mai 2011 9:56.33 UTC+3 kirjutas Casper Bang: >>>> >>>> > (anyone who mentions they use tabs, please line up against the back >>>> > wall) >>>> >>>> Bah if everyone just used a tab to signify a logical indentation >>>> level, your whole question becomes pointless - think about it for a >>>> second. Indentation should be about expressing semantics on screen, >>>> not act as a space macro in the AST. I usually render one indentation >>>> as 4 spaces. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "The Java Posse" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/javaposse?hl=en. >>> >> >> -- >> >>You received this message because you are subscribed to the Google Groups >>"The >>Java Posse" group. >>To post to this group, send email to [email protected]. >>To unsubscribe from this group, send email to >>[email protected]. >>For more options, visit this group at >>http://groups.google.com/group/javaposse?hl=en. >> -- >> >>You received this message because you are subscribed to the Google Groups >>"The >>Java Posse" group. >>To post to this group, send email to [email protected]. >>To unsubscribe from this group, send email to >>[email protected]. >>For more options, visit this group at >>http://groups.google.com/group/javaposse?hl=en. >> > -- > >You received this message because you are subscribed to the Google Groups "The >Java Posse" group. >To post to this group, send email to [email protected]. >To unsubscribe from this group, send email to >[email protected]. >For more options, visit this group at >http://groups.google.com/group/javaposse?hl=en. > > -- >You received this message because you are subscribed to the Google Groups "The >Java Posse" group. >To post to this group, send email to [email protected]. >To unsubscribe from this group, send email to >[email protected]. >For more options, visit this group at >http://groups.google.com/group/javaposse?hl=en. > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
