Wow, over 3500 people voted and it ended up 51%/49%. That's impressive.
It's been a long long time since I've last touched any codebase that used tabs. I thought this debate was pretty much settled by now, but it only comes to show once again how we perceive the world in bubbles.
@hisham_hm I started to use tabs because of an article that claims it is better to use them because of accessibility:
https://adamtuttle.codes/blog/2021/tabs-vs-spaces-its-an-accessibility-issue/
Tbh, after trying to find if this was really the case, I never found a strong evidence that tabs are really better for accessibility*.
However, I end up keeping the tabs for a killer feature:
It's consistent, indentation width is just not an existent discussion with tabs: if you like 4, just set your editor to use 4.
1/2
@hisham_hm I also realized that's for the better for everyone: 2 can be hard for many people to differentiate indentation levels, but also useful when you don't have a big monitor.
Also, I heard that some people uses 1, because due to vision impairment, they use a giant font size, and using 1 width is a pretty good thing.
*One thing I've read is that IDEs should deal with the accessibility, but I personally disagree that we should defer these choices to IDEs as an easy answer like that.
@hisham_hm In conclusion:
To be honest, enforcing this kind of thing on the language level is a bad idea and Rust did a mistake in my opinion :v.
Btw: there's only one language that tabs don't feel right: LISP.
However, lisp never feels right, at least not in the weird indentation formatting we see in lisp code, and that's why I use a "weird++" formatting for my Carp (a lisp) code :V.
@Andre_LA I don't really buy the accessibility argument. It's a slippery slope that could be used to argue for all things: longer keywords? shorter keywords? etc etc. At one point, accessibility needs are high enough they will require tooling support, and at that point spaces or tabs are not that different to deal with.
@Andre_LA In my experience, every codebase with tabs I worked on had some space indentation mixed up somewhere (even if for alignment). I've found that it's easier to keep tabs away from a spaces codebase than the other way around.
Python is also settled in 4 spaces, isn't it? Spaces seem to dominate the Lua world as well.
Anyway, especially if there's a formatting tool, I'll do whatever.
I used to work at a company where we did C and Lua with spaces and Java with tabs. It was fine.
@hisham_hm I agree, I don't buy the accessibility argument as much I used to, but I still find the configurable indentation-width a pretty nice thing.
About mixing indentation, that's pretty true and I find very annoying that code editors still do that...
Anyway, I prefer tabs, but I'm also fine with whatever, especially if there's a formatting tool enabled too.
@Andre_LA The thing about configurable indentation in tabs is that whenever I see a codebase using tabs, I can quickly figure out what size the author has configured *their* tabs too, because things like multi-line expressions and such are often aligned with a mix of tabs and spaces that only make sense with one particular tab size.
@Andre_LA > Btw: there's only one language that tabs don't feel right: LISP.
Looking at code where tabs are used, feels right.
@amszmidt @hisham_hm nice!
Also, I did a mistake on my writing: I meant the code I write, not from others, but that's nice to see an example because all lisp code I did knew was using spaces, thanks for sharing!