r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Aug 26 '20

[deleted]

403

u/zdaga9999 Aug 26 '20

Well you can put semicolons, python doesn't care.

117

u/groostwoost Aug 26 '20

TIL this

53

u/lightgiver Aug 26 '20

The difference is your code won't go poof if you miss a semicolon in python

8

u/XuBoooo Aug 26 '20

It will go poof if you forget indentation.

13

u/ToPractise Aug 26 '20

Modern day Javascript

→ More replies (1)
→ More replies (2)

0

u/[deleted] Aug 26 '20

[deleted]

36

u/DarthRoach Aug 26 '20

But your friends will bully you for not being pythonic if you do that.

0

u/[deleted] Aug 26 '20

[deleted]

5

u/BrandolynRed Aug 26 '20

I haven't kept up with additions to the language in a while. What does := do? It's a pain to google

0

u/[deleted] Aug 26 '20

[deleted]

4

u/BrandolynRed Aug 26 '20

Thanks, I can see why that's controversial. Tbh I'd prefer the rust style match pep.

→ More replies (3)
→ More replies (1)

5

u/13steinj Aug 26 '20

But is := not pythonic? Even that's up to debate.

10

u/thirdegree Violet security clearance Aug 26 '20

It's a python operator, defined in pep, kinda by definition it is pythonic.

→ More replies (2)
→ More replies (1)

23

u/zdaga9999 Aug 26 '20

I know that, but it doesn't care if you put it at the end and then hit enter.

→ More replies (6)

16

u/[deleted] Aug 26 '20

Everyone at your organization will hate you though. Gotta follow internal style standards.

7

u/infecthead Aug 26 '20

Semicolons are a pep8 violation (and I'm guessing every python style guide follows the same rule), so python does sorta care about semicolons - just not enough to stop execution

→ More replies (3)
→ More replies (44)

57

u/AngelLeliel Aug 26 '20

Python has its own special semicolon. It's called line break. That's it. Take it or leave it.

→ More replies (5)

37

u/marco89nish Aug 26 '20

I support braces for structure but semicolons are just junk in 99% of cases, because I don't put multiple statements on same line in 99+% of cases. Newline is much better separator than semicolon

35

u/MysticTheMeeM Aug 26 '20

But it also makes it hard to have one statement over multiple lines.

→ More replies (10)
→ More replies (3)

7

u/DonutDonutt Aug 26 '20

I feel the same way. I need my braces and semicolons. Even in something like c++, not using braces for a 1 line if statement feels wrong and messes with my brain

→ More replies (2)

20

u/Jeb_Jenky Aug 26 '20

I don't know. I honestly feel like it makes it look less cluttered. And the forced indentation definitely adds a nice structure to it that reminds me more of natural type in English. That being said, Rust is by far the prettiest looking language to me. I have no idea why because usually I have no idea what's going on with it, but it's so pretty. Go is one of the ugliest looking to be, but I love Go. Nothing makes sense anymore.

18

u/ReallyNeededANewName Aug 26 '20
object
    .iter()
    .filter()
    .map()
    .collect()

Wonderful

7

u/vale_fallacia Aug 26 '20

Similarly with Haskell and Lisp. (In my opinion!)

Haskell looks gorgeous, the code looks like art. Lisp all to often looks like confusing mangled parentheses. But I really like both languages.

→ More replies (1)

4

u/Johanno1 Aug 26 '20

Oh either you didn't write much code or you are used to it. But I wrote much Java code and even though the semicolon is least annoying thing in Java it is still annoying when you hit run and there's a missing one 31 lines up.

And in python you just write code and don't have to think much about such shit.

But yeah for big projects I would not recommend python.

→ More replies (37)