Surprisingly, I've never had the tabs vs spaces argument, and I'm not actually sure which I prefer.
Surprisingly, I've never had the tabs vs spaces argument, and I'm not actually sure which I prefer.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
As long as it's one or the other.... haha. Either one is the right answer if it's compared to "efficiently written code" with no formatting![]()
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
SO very correct.
Personally, I prefer spaces - though it wasn't always that way. Some reasons I switched:
... tabs end up displaying v e r y w i d e on some websites (github in particular); making it inconvenient to read tab-indented code.
... I started studying python, where indentation actually matters (four spaces signifies a code block, like { brackets } do in php).
... I got a code editor that supports using spaces instead of tabs (and still treats them like tabs: stepping over them, everything still lines up, etc.).
there are other reasons, but I've forgotten them. I'm very comfortable with spaces now. As Daniel says, as long as you choose one-or-the-other.
I prefer tabs because they're easier to type. But I often find code with spaces in it so I'll use those consistently to make it match. I don't really care.
I do end up using spaces often enough because of typing code when I can't use tabs-- such as on DD. Then I end up with spaces instead of tabs. It's a little more to type.
But... it does the same thing. I didn't realize it was such a big debate, haha.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks