Hacker News new | ask | show | jobs
by sublinear 1318 days ago
> If you had used tabs, changing the tab size would make it align all wrong.

This is clearly false. You said this after giving a perfect example of how it's done with tabs.

2 comments

So you are saying that using a tabstop of eight to align this:

  -------->coolFun(arg1,
  -------->------->arg2)
Would still look nicely aligned with a tabstop of 4? and 2? Clearly that will not look right.
To understand tabstops properly, you need to throw away the "They always expand to N spaces." idea. If you have access to a mechanical typewriter with tabstops, then go and look at how it works (with tabs being set by protruding pins on the carriage). Tabstops in terminals in the Unix and Linux worlds work this way.

https://superuser.com/questions/710019/why-there-are-11-tabs...

If you use it as indention then "tab expands to n spaces" is actually accurate though.
You're misquoting yourself.
I don't know what your point is then, but this is turning in to a very trite conversation.
> > If you had used tabs, changing the tab size would make it align all wrong.

> This is clearly false. You said this after giving a perfect example of how it's done with tabs.

I believe the post you're replying to meant "used more tabs". That is, if you used any tabs beyond the code indentation, they would get altered when you change the indentation size and ruin the alignment.

This was indeed the misunderstanding.

When I made my original comment I thought what I was replying to was an example of "tabs to indent and spaces to align" immediately followed by a statement that the only way to use tabs is to both indent and align.