3 ms·
You are clearly being thoughtful, but the problem with tabs and mixing them into code is that when multiple people write the code, some spaces are going to slip
by olau 9y ago
You are clearly being thoughtful, but the problem with tabs and mixing them into code is that when multiple people write the code, some spaces are going to slip into that tab heaven, and then indentation will break for someone.
So by choosing tabs, either the file must be consistently formatted with tabs by everyone always, or everyone must look at the code in the same editor configured in the same way always.
I remember reading jwz's rant on this long time ago and not getting it until I had the first what-is-going-on-here moment due to wrong indentation from mixed tabs and spaces. jwz is right. Stop using tabs.
- GavinAnderegg 9y agoI'm honestly not that worked up about tabs/spaces, I just get frustrated when I see people assuming those indenting with tabs are careless or anti-social. I only indent with tabs on projects where I have control over the style standard. About your argument, though: Isn't is also possible for someone to copy/paste something with tabs into space-indented code? Isn't is also possible for someone's editor to start off with tab-based indentation by default instead of space-based and mistakenly add the wrong whitespace to the project?