Programming
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
Honestly, my editor (Neovim) just picks between tabs and spaces for me, so I just end up using whatever's already there. The only language where I'll explicitly use one is Haskell, just because spaces there allow me to keep everything nice and lined up.
I'm tinkering with a whitespace language and prefer using 1-space rather than 2. I don't really like the double character for 1 level. Is that weird?
Tabs are forbidden though I could use tabs with a (1-line) per-file code filter for the compiler to turn 1 tab into 2 spaces, and that might be easier when working with others (though I don't know how it would be seen, especially needing to change editor tab behavior).
That’s all well and good if everyone uses editors you can configure to a certain standard all the time. Then tabs all the way.
Unfortunately that’s not reality for everyone.
Tabs let you define how big you want each indent to be, and spaces do not.
Spaces can too: Simply use more or less of them, to taste.
I have ADHD. Two spaces per indent makes it damn near impossible for me to scan code.
Then use four, or six, or eight, or 20. Hell, most code I've seen uses four spaces per indent anyway.
[Re: braille]
Surely there's an editor out there that will automatically display indent spaces as a tab character. Or failing that it seems like it would be rather trivial create a program to convert n spaces to tabs, and vice versa.