It doesn't work for indent-sensitive languages like Python, but it works for most of the other major languages.
The Tabs vs. Spaces war is over, and spaces have emerged victorious
101–110 of 238 posts
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#102Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#103Earlier quoted context omitted.
> so by using tab, one ... allows the developer to determine screen spacing to their comfort (Allow me to reply to this age-old argument with the age-old counter argument...) But you also have to decide at what point to hard wrap each line based on a max line length, and you can only do that based on some choice of tab size. Anyone with a different tab size preference would see the right column wandering depending on…
I dont even understand what youre trying to describe here. What is a wandering right column? This argument fails by default if its not understandable.
line1 = wrapped
+ to_here_max
if something:
another_line
= some_val
+ other
Of course this is exaggerated, especially because most lines won't be close to max width let alone exactly at it. But you can set the width of your editor to whatever number of columns that you're hard wrapping to (i.e. what you save in the file) and be sure every line will fit.Then someone else loads it with tab width set to 6:
line1 = wrapped
+ to_here_max
if something:
another_line
= some_val
+ other
Now the max column width of a line depends on the syntactic indentation level of it! Any width you choose for your editor will either overflow for some deeply nested lines or waste loads of space on less-nested lines.Of course it's not a real concern because your editor can probably automatically fix this. But if it's clever enough to do that, then the supposed extra flexibility of tabs is actually possible with spaces anyway.
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#104Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#105Earlier quoted context omitted.
> another developer is seeing the code different than you. but that's the whole damn point ... I like substantively indented code, you prefer minimally indented, we should both be happy (and we can be, by using tabs).
You could certainly make that argument. You could also make the argument that all the developers on a project seeing the same view of the code enhances collaboration and team cohesion, especially if your team does pair programming. This is often why dev teams have more specific style guides that include things would be considered bike-shedding, like how many spaces an indent is.
Why not bikeshed the bikeshedding?
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#106Earlier quoted context omitted.
> so by using tab, one ... allows the developer to determine screen spacing to their comfort (Allow me to reply to this age-old argument with the age-old counter argument...) But you also have to decide at what point to hard wrap each line based on a max line length, and you can only do that based on some choice of tab size. Anyone with a different tab size preference would see the right column wandering depending on…
> But you also have to decide at what point to hard wrap each line based on a max line length I think that you should not be doing this, for the same reason that you should use tabs. It allows the user to select whichever hard wrap point (if any -- I generally choose to not have one) they prefer. But all of this sort of thing is pointless debate these days, when it's pretty fast and easy to preprocess the files to ma…
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#107Earlier quoted context omitted.
You could certainly make that argument. You could also make the argument that all the developers on a project seeing the same view of the code enhances collaboration and team cohesion, especially if your team does pair programming. This is often why dev teams have more specific style guides that include things would be considered bike-shedding, like how many spaces an indent is.
It seems that you don't understand what a tab character is ...
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#108Earlier quoted context omitted.
I use tab at three. And will do to the day I die.
Sometimes I remember a workplace system I used, where someone had set tabs to 8 space. I don't know why it was 8, but it was.
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#109Earlier quoted context omitted.
Exactly. Indentation != spacing. And thats all the argument i need. I dont understand why people argue with consistent text layout for all-spaces. You can use tabs to indent and spaces to align after that, in most cases.
> You can use tabs to indent and spaces to align after that, in most cases. In practice this is difficult; since the characters are invisible by default, people will inevitably mix up the two. Looks like the industry standard is to give up and use spaces everywhere, unless strict and mandatory tooling exists.
Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious
#110Earlier quoted context omitted.
> so by using tab, one ... allows the developer to determine screen spacing to their comfort (Allow me to reply to this age-old argument with the age-old counter argument...) But you also have to decide at what point to hard wrap each line based on a max line length, and you can only do that based on some choice of tab size. Anyone with a different tab size preference would see the right column wandering depending on…
> But you also have to decide at what point to hard wrap each line based on a max line length I think that you should not be doing this, for the same reason that you should use tabs. It allows the user to select whichever hard wrap point (if any -- I generally choose to not have one) they prefer. But all of this sort of thing is pointless debate these days, when it's pretty fast and easy to preprocess the files to ma…
And then have merge conflicts between people who set different hard wrap points? Did you mean to say soft wrap point?