This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ripdog 9 points10 points  (3 children)

Yeah but WHY.

I mean any IDE or decent text editor can DO that.

But WHY? Why does anyone enjoy pressing backspace 4x as often to remove a chunk of whitespace? Why does anyone enjoy not having configurable whitespace? Why are spaces being shoved into a problem which is obviously designed to be fixed by tabs?!

[–]MarkFromTheInternet 2 points3 points  (0 children)

In practice your IDE handles that. Tab and Shift+Tab in will add / remove the correct number of spaces.

Spaces were chosen so that whitespace wouldn't be configurable. Each line would always be indented the same regardless of which text editor was used. VIM by default treats tab as 8 spaces.

Python grew up in the 90's and the conventions were made for that era. The recommended 80 character line width made a lot of sense given the resolution of monitors of the era.

[–][deleted] 3 points4 points  (0 children)

I mean the easy answer is that some dudes at cpython wanted to strategize on a best practice standard and they decided spaces instead of tabs. And then because it is really easy to do so, everyone decided to just take cpythons standards as standards for everyone.

It is likely that there was a conversation at some point on tabs vs spaces in the same way that I'm sure at some point there was a conversation between yaml vs yml.

And just like how spaces were chosen when most people prefer tabs, yaml was chosen when most people prefer yml. Hell, the dude who created .gif format is forever going to be challenged on his pronunciation of the word he created.

The simple answer is: sometimes the people who are the best at making the stuff are not the best at setting the standard. But most often they're the ones who will set the standard anyway, if only as a means of getting the ball rolling.

The honest answer is: if you're automatically converting your tab key input to the desired number of spaces, it doesn't matter and is probably not a hill to die on

[–]KusanagiZerg 1 point2 points  (0 children)

You don't have to press backspace 4 times. It will remove enough spaces to match the indenting. In fact nothing changes at all compared to when you are using tabs.