3 ms·
> tabs actually use less space on disk as only one character is stored instead of 2, 4 or 8. If I didn't have the ability to store 1,000,000,000,000 of them, I
by UnoriginalGuy 12y ago
> tabs actually use less space on disk as only one character is stored instead of 2, 4 or 8.
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.
- smt88 12y agoCode 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.