Re:Who decided indenting with spaces was a good idea?
by smt88 on Thursday April 02, 2015 @06:51PM
(#9313658)
Code size does matter for websites and web apps, and for high-traffic sites, the difference between 1 byte and 4 bytes is significant.
That said, if you've gotten to a point where you have high traffic, you've had lots of time to implement something that optimizes your assets anyway.
If I didn't have the ability to store 1,000,000,000,000 of them, I'd care greatly. To be honest source code size isn't even in the ballpark of concerns I have. Intermediate bin files (e.g. obj files) are far larger and problematic for source control and sending source to someone (e.g. several meg a piece rather than a couple of hundred KB).
As for an answer to your question: Spaces are an exact width. Tabs change widths. Therefore for precision and reproducibility spaces are a better choice across all platforms.
Many IDEs support inserting a preset number of spaces when you tab anyway, so the problem is invisible to you.