DEV Community

Discussion on: Why we should default to Tabs instead of Spaces for an 'accessible first' environment

Collapse
 
swiftninjapro profile image
SwiftNinjaPro

I agree, tabs are better because of smaller files.

When you add up hundreds, or thousands of tabs, spaces would multiply that by 4.
100 tabs = 400 spaces.
1000 tabs = 4000 spaces.
1 million tabs = 4 million spaces.

you can reduce the file size to -3000 bytes by using tabs instead of spaces.
In the case of 1 million, your replacing 4000kb with 1000kb, simply by using tabs instead of spaces.

Of course, if you minify the final code, this only matters for space on your own PC, or if you have a team, it saves space on their PC. Also saves space on github, if you upload the original code.