4 ms·
> if you are using different size tabs from me. But the point of tabs is that you tell your editor how many spaces wide you want them to be, so unless I'm misu
by jordanlev 9y ago
> if you are using different size tabs from me.
But the point of tabs is that you tell your editor how many spaces wide you want them to be, so unless I'm misunderstanding you, this is not an issue.
As for lining things up, tabs are used for the indentation level of the current line, but if you need to further nudge things within that line then you'd of course use spaces (after the initial tab indent).
- rlpb 9y agoYou misunderstand me. I can set my tab size different from yours, but doing that will change the horizontal window width required to view your code. This is the problem I'm describing.
- jordanlev 9y agoHow is that problematic though? I'm not aware of any language or situation where the width of the window has any impact on anything.
- watwut 9y agoSomeone who uses 8 spaces for tab will do less nesting them someone who users 2. Thay is how I read the above comment.
- adrianmonk 9y agoAssume you want to eliminate horizontal scrolling. This is a valuable enough goal that a lot of coding style guides have a width guideline. That keeps everybody from having to make their editor windows as wide as the last person who worked on the code. If this arrangement is working, nobody has to scroll horizontally, and there is no arms race of ever-wider editor windows. Now introduce tabs into this situation. In theory I can set tabs to be whatever size I like. But in practice, I can't make them wider than the last person who worked on the code, because then I'm back to horizontal scrolling. Moreover, if I make them narrower, then they have to narrow their tabs to keep pace. So you get an arms race of tab- narrowing instead of window widening. I just want to code. I don't want to scroll horizontally, or constantly mess with my window width and/or tab settings to avoid that. It's extra work that doesn't accomplish anything.
- jordanlev 9y agoI am genuinely baffled (but I don't think I'm right and you're wrong... I trust HN people to be smart and capable). Can you please explain to me how using tabs vs spaces would encourage people to indent their code differently? I mean, if I have an "if" statement, then I indent my code -- but why would people indent their code for reasons other than what the flow of the code suggests? And if these hypothetical "indenting just because I can and not because I should" people exist, how would their inconsiderate behavior be any different whether they are using tabs or spaces?
- adrianmonk 9y agoI'm not talking about using a different style. I'm saying that different tab widths lead to different requirements for how many columns wide my window must be.