5 ms·
I agree with you and kinda wish people would take a combined approach. Tabs are better for indentation preferences. Spaces ensure that everyone sees the same t
by fragsworth 9y ago
I agree with you and kinda wish people would take a combined approach.
Tabs are better for indentation preferences. Spaces ensure that everyone sees the same thing, which can help in multi-line situations.
So I wish people would avoid this black-and-white discussion. Use tabs for indentation, and spaces for multi-line alignment...
- woodrowbarlow 9y agowait, but that defeats the purpose of both, right? if you change the width of your tabs, then the hard-spaced multi-line parts will no longer align.
- zeveb 9y agoNo, your editor just inserts as many tabs as the initial line had, then spaces over appropriately. This will align properly with any tab setting. I think the real problem with tabs is that so many people use weak editors.
- sofal 9y agoIt would be ironic to use tab characters as some kind of magnanimous concession to other developers' preferences while at the same time requiring them to drop their editor of choice.
- okdana 9y agoThey mean like this, where `-` is tab and `.` is space: --def myfunc( ---foobar = 1, ---...baz = 2 --) (silly example, idk, you get what i mean) No matter what size tab stops you use, the `=` will always line up vertically, because the tabs are only used for the indentation (nesting level), not the visual alignment.
- chaosfox 9y agoyeah, reading this entire thread shows why spaces is more popular. nobody knows how to use tabs properly.
- nocman 9y ago"So I wish people would avoid this black-and-white discussion." ^ complaint about "black-and-white" discussion "Use tabs for indentation, and spaces for multi-line alignment..." ^ totally "black-and-white" solution :-D