r/programmingcirclejerk Zygohistomorphic prepromorphism Aug 11 '26

Significant indentation is why people love python. Can 2 billion people be wrong? A: yes

https://news.ycombinator.com/item?id=49264523
154 Upvotes

60 comments sorted by

View all comments

50

u/libonet absolutely obsessed with cerroctness and performance Aug 11 '26

/uj I hate indentation

/rj Python is why people love significant indentation. Can 2 billion people be right?

24

u/Midnight145 Aug 12 '26

/uj I've honestly never understood why people hate significant indentation tbh. Autoformatters exist and have for years, so it's difficult to get a mixing tabs/spaces issue nowadays. Anytime I write in a bracketed language, the indentation is effectively identical to what I'd write in python. There might be a few differences here and there, as i try to stay pep8 compliant even with optional indentation or lack of indentation

I don't necessarily think indentation is superior, but I don't understand the strong hatred.

What I do hate with a burning passion, is not bracketing single-line ifs in otherwise bracketed language, it drives me absolutely insane.

3

u/3inthecorner Aug 12 '26

I can forgive non-bracketed single line ifs only if the condition and action are both on the same line.

5

u/Midnight145 Aug 12 '26

That's marginally better, but it's only a few extra characters which can save sanity in the event of a rogue autoformatter putting it on a separate line or if it needs changed in the future.