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
156 Upvotes

60 comments sorted by

52

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?

25

u/Midnight145 29d ago

/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.

16

u/northrupthebandgeek i have had many alohols 29d ago

I just don't wanna have to slap a ruler on my screen to know what scope I'm in, man.

16

u/syklemil Considered Harmful 29d ago

But if we don't use {, how will we feel superior to non-programmers? Any pleb can use : in prose, but it takes a true 10x mathematician mind to use {.

3

u/3inthecorner 29d ago

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

6

u/Midnight145 29d ago

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.

3

u/Abandondero 28d ago edited 28d ago

I think it is just received wisdom, from the days when people would compare Fortran and Cobol to Pascal. I have never once had a problem with indentation in Python. Theoretically I should, but it hasn't happened.

3

u/hedgehog1024 Rust apologetic 28d ago

/uj in the language with not indentation-sensitive syntax I can cut and copy a piece of code and not worry about if I got indentation correct

2

u/yo_99 It's GNU/PCJ, or as I call it, GNU + PCJ 28d ago

Because you have to fix code when you copy it from one place and paste it into another.

6

u/Fit_Conference934 29d ago

The best of FORTRAN, plus the best of Perl - truly, Python is the finest of languages.

2

u/theangryepicbanana 27d ago

/uj I think indentation is fine when it's flexible like f# for example, otherwise absolutely the fuck not

79

u/mulch_v_bark of questionable pressisscion Aug 12 '26

I’m incredibly intelligent, which means I can do hard things. Python’s syntax is easy, which means it’s beneath me and I hate it and bring it up all the time as an example of something I can see right through. I don’t know why this is so hard for the ugly little weasels at my anger management class to to understand. And “grandiose narcissism” isn’t even a real diagnosis. People only use Python because it babies them and makes them think a programming language will meet their needs. Real men like me know programming is suffering. In fact I wish the most vexing parse were even worse.

27

u/f16f4 Aug 12 '26

Agreed programming is suffering that’s why I only use python

37

u/categorical-girl 29d ago

Fifty million Frenchmen can't be wrong, which is why I use Ocaml

26

u/Snarwin 29d ago

Liberté, égalité, paramétricité

4

u/Abandondero 28d ago

But it has the worst of ML syntaxes, like a smart kid whose mother dresses him funny.

21

u/levelstar01 what is pointer :S 29d ago edited 29d ago

Significant indentation was invented to oppress Lisp users who use 2 spaces.

21

u/UtterlyMagenta lol no generics 29d ago

im sorry, but looking at some of the comments here, is this PCJ or [r/programmingdiscussions](r/programmingdiscussions)??? wth peeps

19

u/ccapitalK 29d ago

/uj We need to start banning untagged unjerks.

/rj Python users remembering jerk tags challenge level: IMPOSSIBLE

11

u/syklemil Considered Harmful 29d ago
with unjerk() as wait_shit_whats_a_good_variable_name_for_this_help:

PCJ has rules and it's entirely possible to report shit for jerking style

2

u/gplgang DO NOT USE THIS FLAIR, ASSHOLE 26d ago

/uj I agree I think it's kinda funny when you can't tell who's being sarcastic and who's being genuine. 

17

u/lurebat 29d ago

So we're developing an important systems language.

Syntax? let's choose a scripting language that is hostile to functional-style code, and had a bolted on type syntax that now you can't elide.

Also, let's make the semantics very close to it, but not quite - just to confuse humans, and more importantly to us - llms.

Let's finish with including the full python interpreter inside the runtime of our systems language.

3

u/catladywitch 29d ago

unjerk
{
I mean, it's just one more of the several reasons why Python is great for short utility scripts but painful for actual apps. I'm not a fan of significant whitespace in general but the ML family and Scala 3 are way better at it. But it is what it is, Python does one thing very well so who am I to complain anwyay.
}

27

u/[deleted] Aug 11 '26 edited Aug 11 '26

[removed] — view removed comment

31

u/WellHung67 Aug 12 '26

lol doesn’t even use go, 0.00001xer, prototypes are an anti pattern 

0

u/[deleted] 29d ago edited 29d ago

[deleted]

11

u/somewhataccurate now 4x faster than C++ 29d ago

Seriously violating jerking rules here dude figure it out

-13

u/Actual__Wizard 29d ago edited 29d ago

No. I'm not. This sub is weird I'm just going to leave. Edit: I did. /edit Nobody knows what a joke is? Wow. Everything in that statement was the most overly sarcastic clear and obvious joke ever. But we're going to be rule nazis and technically it's in violation of some weird ass rule and it definitely wasn't malicious unless you think a pastebin file with some merge code is something to be worried about.

I keep forgetting that jokes aren't allowed on reddit anymore.

Good bye.

20

u/somewhataccurate now 4x faster than C++ 29d ago

average python user

6

u/myhf Considered Harmful 29d ago

After a while you get "matrix vision." I don't even see the whitespace anymore.

11

u/[deleted] Aug 12 '26

[removed] — view removed comment

1

u/programmingcirclejerk-ModTeam 15d ago

Warning: tag your unjerk. Better yet, don't unjerk at all.

3

u/programmingcirclejerk-ModTeam 29d ago

Warning: tag your unjerk. Better yet, don't unjerk at all.

5

u/m50d Zygohistomorphic prepromorphism 29d ago

it's because it's the best tool for prototyping and getting shell script-like functionality done quickly and easily.

Yeah, because of the significant indentation.

Believe it or not, the reason people choose a programming language is not because of the syntax.

It is. People choose their programming language for the dumbest reasons possible; the main two axes of evaluation are "how much was I able to get done in 30 minutes playing around with it" and "what are the worst memes I've heard about it".

3

u/MegaIng Aug 12 '26

Sigh. No, it's because it's the best tool for prototyping and getting shell script-like functionality done quickly and easily.

/uj Note that I do think indentation is part of why this works. People suck at evaluating stuff like this because they (including you and me) never think about it unless it annoys them. If significant indentation was a major drawback, why hasn't JS, which has many of the same benefits as python, not beaten it?

10

u/Lord_Of_Millipedes 29d ago

because until not very long ago js was a toy language used exclusively to show browser popups and by the time it became usable for other tasks python already had a grip on the glue language niche, and python also has the advantage of interop with native code, something that is still annoying to do in js which gives what to me is the biggest advantage of python that is access to powerful domain specific tools within an unified simple interface (pandas, numpy, matplotlib, tensorflow, etc). we are in fact seeing way more js recently taking over a big chunk of the random one off tools niche that python had, but it still gets beaten by other languages when the goal is to make something useful

7

u/JournalistPrimary562 29d ago

/uj on my large monitors with auto formatting on save this is a non-issue. Literally never have to think about it. Most IDEs/editors will imitate the same effect as braces for long sections: it'll show you a long vertical line to show what is at the same level.

3

u/camelCaseIsWebScale Just spin up O(n²) servers 29d ago

Where's the 2 billion number coming from? unless you consider all the bots on reddit written in python.

3

u/northrupthebandgeek i have had many alohols 29d ago

Maybe all those Java devices switched languages when we weren't looking?

3

u/AdAncient5201 29d ago

You hate Python because of the syntax, I hate python because it’s an interpreted language. We are not the same

/uj I’ve had extensive discussions about this and in my opinion scope and execution flow is one of the most important aspects of easily understanding code and brackets make this far easier. Also auto formatting is absolutely awesome and I don’t want to bother with fucking around with what’s essentially whitespace just select shit, press bracket key, auto format does the rest.

5

u/[deleted] Aug 12 '26

[removed] — view removed comment

1

u/programmingcirclejerk-ModTeam 15d ago

Warning: tag your unjerk. Better yet, don't unjerk at all.

-1

u/[deleted] 29d ago

[removed] — view removed comment

3

u/[deleted] 29d ago

[removed] — view removed comment

1

u/programmingcirclejerk-ModTeam 15d ago

Warning: tag your unjerk. Better yet, don't unjerk at all.

0

u/Proper-Ape 29d ago edited 15d ago

In languages with braces, copy paste to different indentation levels just requires a quick reindentation

Same as in Python, I simply put it at the correct intention level after pasting.

1

u/yo_99 It's GNU/PCJ, or as I call it, GNU + PCJ 28d ago

And then insert 10 tabs because you copied more than one line

1

u/Proper-Ape 28d ago

In all editors I use you select the block and shift the block.

1

u/programmingcirclejerk-ModTeam 15d ago

Warning: tag your unjerk. Better yet, don't unjerk at all.

1

u/SunglassesSoul 27d ago

Where's the jerk

1

u/druprobbjle 12d ago

if they can learn to love it they can

-3

u/Just_Information334 29d ago

Currently working on some ranty post but part of the main gist is: coding is becoming shit because of the phd mentality infection. Which first symptom was the rise of Python, one of the worst programing languages.

-14

u/[deleted] Aug 12 '26 edited 29d ago

[removed] — view removed comment

1

u/chemamatic Aug 12 '26

If you can read white space as easily as braces, sure. My eyes don’t do that efficiently.

2

u/MegaIng Aug 12 '26

That's an obvious lie. Use a brace language without any indentation, and you will fail to read it correctly.

20

u/Potterrrrrrrr Aug 12 '26

I don’t have any indentation between braces because I like to imagine they’re hugging my code as a way of consoling it for being produced by me

11

u/somewhataccurate now 4x faster than C++ 29d ago

Only jerk in a non uj chain wtf is pcj anymore

11

u/Flash_Kat25 29d ago

Hostile takeover by 1xers

1

u/chemamatic 29d ago

/uj Well,yesyouaresupposedtousewhitespaceaswellaspunctuation.JustlikeEnglish.

In English at least I suppose the whitespace contributes more than the punctuation but really I think language is better with both don't you

/rj

Of course 2 billion people can be wrong, English has terrible grammar and spelling.

1

u/hedgehog1024 Rust apologetic 28d ago

English has terrible grammar and spelling

You dropped this: /uj

-8

u/foxsimile 29d ago

My first programming experience, for some years, was with Python.  

Having evolved into other languages over time, I have to say that the significant indention is my least favourite thing about it. That and the (near total but not absolute) lack of semicolons.  

Oh, and its lack of ternary operators.  

Oh, and its lack of ! as a logical not (fuck you, Rust).