3 ms·
Did anyone seen actual "broken" indentation on any system in the last 10 years? (specifically indentation, not mid line breaks filled with tabs) Because that is
by Yizahi 5y ago
Did anyone seen actual "broken" indentation on any system in the last 10 years? (specifically indentation, not mid line breaks filled with tabs) Because that is the only argument for spaces.
Personally, I sometimes log onto very old boxes running some old OS and s/w, and I've never seen broken indentation display for tabs.
I think replacing tabs with multiple spaces was a valid solution in 20th century, but not anymore for last decade at least. Instead it transformed into a cargo cult like obsession, with zero valid reasons today.
- jakub_g 5y agoIf you use tabs, GitHub renders it as 8 spaces, which is... a bit excessive and legacy IMO. I think until this is changed, using tabs for content that you want to be viewable in GitHub UI and has multiple levels of indentation just does not make sense.
- tapland 5y agoOh yes. The code wasn't written inte last ten years, but oh yes. I've also seen code from a senior dev which consistently used two tabs, eight spaces, tab for some reason. I replaced it with spaces to fit the rest of the 50k lines (COBOL) when I was in the area making a change. We are also saving 5-10% storage by removing whitespace at end of line, so.
- Yizahi 5y agoI was asking not about the badly written code. I was asking about when you have lets say "good" code with tabs, when they are used for indentations and there is a single tab per line start, but that file is for some reason displayed garbled because text viewer/editor on the host can't work with tabs properly. Because that was the reason always given for spaces usage - "what if I want to open code with tabs on some super duper legacy system from decades back, and some weird editor will mess up my indents. Spaces are safe everywhere." And my point was that I haven't seen a system which can't handle displaying tabs in very long time (or ever).
- tapland 5y agoI get you. I think the reason for the horrible tab spaces mix was that our system doesn't display tabs well and me seeing them in sublime/code/np++ where the older devs prefer to edit on the system itself. The reason I want to use tabs is accessibility for visually impaired. Know some great devs who have to zoom lines until they become mega-sized and with four spaces the next line is a far scroll away for them, whereas with tabs they can set very slim tab widths.