I guess I’m not the only humorist around
Personally, in coding I would lean towards tabs… except that changing the tab length can mess up some formatting, and that doing a copy/paste in a terminal always ends up with the copy having spaces and causing all heck to break loose if tab length changes.
Always ends up being a headache when I’m away from coding for an extended period and then come back to it.
That’s pretty much my take. Spaces are explicit and well-defined and (given enough of them) can do everything themselves without any tabs. Tabs OTOH are implicit and undefined and can’t represent spacing shorter than whatever the current tab setting is. So you always have to have spaces anyway and it’s just too easy to end up with a mess using a mix of the two.
When hitting Return in Turbo Pascal and Delphi, the editor automatically started the next line at the same number of tabs used in the previous line. There was a key stroke that set the beginning at one less tab, and the tab key added an additional one. This made it very easy to make the code readable. /not a trained coder
I know vi can be configured to do that also, which is sometimes useful.
I think when I learned C/C++ in the Borland IDE back in the day, tabs were commonly used for structure also. As long as I’m only coding in a local editor, tabs are usually quicker and easier to keep consistent, and I’ve never felt like I needed spaces unless I was getting overly precious about formatting an array, a comment, or a particularly nasty if statement that I’m spreading across multiple lines.
Nowadays, though, I’m usually editing/debugging scripts that will run on remote servers or inside a contained environment. So I end up changing things on-the-fly through a terminal pretty often, or (even worse) bouncing between editing over a terminal and in a local text editor, and that’s when everything starts going downhill if I’ve fallen into old habits…
I’ve always preferred tabs with a size of 4.
Embedded tabs make typing much easier with editors that auto-indent new lines. One tap of the backspace key is all that’s needed to go back one level of indentation.
But a file with embedded tabs gets ugly indeed when opened or displayed with a different tab size.
Filters exist to convert tabs to spaces and vice-versa (I even wrote my own back in the mists of time), but the extra step of using such a filter becomes a nuisance.
I loved Turbo Pascal! It was my first ‘real’ language after BASIC.
Nowadays all my editors and IDEs are set to automatically translate the tab key to spaces and handle indent and outdent the same (and they auto-indent like that). That means if I open it in vi or something else that doesn’t automatically do that, it’ll still look and work the same. (Especially important for things like python and yaml where whitespace is semantically significant.)
Me too.
… when I’m coding on my phone (with its narrow viewport and accordingly small number of columns) I don’t want structural indents to be more than two spaces anyway
and it’s not that helpful to have special keys that mean “two more spaces” or “two less spaces”
I mean, in 1965 maybe people could save precious bytes by swapping eight spaces for a \t, but we have more advanced compression tools now
I’m used to the IDE automatically converting a tab to the preset number of spaces. (For some reason in our shop it’s 3, just to be different I guess…)
YEouch, I’m not that old.
More a matter of ease of lining things up and keeping things consistent for me. I’ll admit, I learned programming before the newfangled languages doing idiotic things like making blank space have meaning, though.
Not too long ago I tried running TP 3.x in a DOS emulator. Those early versions didn’t have pulldown menus, and I could not remember ANY of the editor command keys!
Good thing I still have my old cheatsheet.
I can’t believe it’s lasted this long!
I just finished saying earlier that I wasn’t that old, but… first computer I used (aside from game consoles or a friend’s C64) was Z80-based, so this kinda hits hard.
I’ve ordered one, just because I might at some point have the time to fiddle around with it. Sure, they’re keeping more modern versions available, but there’s something to be said about being able to learn how the original worked.
The RCA 1802 is apparently still being made.
If you haven’t seen this yet, check it out:
All of his stuff is great, this is just the most relevant to this current discussion.
This thread reminds me of the time I wrote a term paper for a photography course where I exposed something like 64 rolls of Kodak black and white film, developed them for all different amounts of time, testing for the effects of pushing and pulling the film.
The icing on the cake is that I wrote a LOGO script on my C64 to chart the results and included the source code with the paper.