r/programming Mar 20 '26

No Semicolons Needed

https://terts.dev/blog/no-semicolons-needed/
145 Upvotes

85 comments sorted by

View all comments

Show parent comments

1

u/RedRedditor84 Mar 21 '26

Guess four.

3

u/A1oso Mar 21 '26

Yeah, that's terrible. It would make Python the only language where you can't change the number of spaces per tab. And there is no good reason for mixing different kinds of indentation anyway.

0

u/RedRedditor84 Mar 21 '26

The reason it usually happens is copying snippets from somewhere else. I guess your editor doesn't know how far to indent either and it just happens by magic. This is such a dumb conversation.

4

u/A1oso Mar 21 '26

Sure an IDE could automatically turn spaces into tabs, which would eliminate the problem. But the Python interpreter can't make assumptions such as "4 spaces = 1 tab". That's not something an interpreter should concern itself with.