4 ms·
I don't mean to start yet another tabs vs spaces debate, but I've always felt spaces dictate how others see the code while tabs allowed others to see code howev
by AncientPC 14y ago
I don't mean to start yet another tabs vs spaces debate, but I've always felt spaces dictate how others see the code while tabs allowed others to see code however they like (2/4/8 spaces).
One exception is some projects are strict about lining up code properly in multi-line statements, and spaces are more consistent in that respect.
I prefer tabs, but most Python code I've seen has been 4 space indents.
- toyg 14y agoI used to prefer tabs (less bytes, better abstraction etc), but I've long given up on it. Most tools are not smart enough to switch mode when required, and reformatting entire files every time you want to make a small change on somebody else's code is a real pain (and dangerous). Community consensus is 4-spaces and that's it.
- raverbashing 14y agoYeah I used to prefer tabs as well, and I still stand by it. But you can always configure your editor to use 4 spaces. And 4 spaces looks like 'less wasted space'. I'll keep using tabs for some things, and 4 spaces to most professional projects. About 2 spaces I'll just say one thing: NO
- sswezey 14y agoSublime text 2 can do it no problem, back and forth, and has visual indicators of tab levels regardless if it's spaces or tabs, 2 columns, 4 columns or 8 columns.