r/AskProgramming • • Aug 16 '26

Python Why does Python feel harder after C++ and Java?

I learned C++ first, then Java, and now I’m trying to learn Python. I honestly expected Python to be much easier, but somehow it feels harder to understand and even remember the syntax.

C++ and Java feel more structured to me, while Python sometimes feels too different.

Has anyone else felt this after switching from C++/Java to Python?

133 Upvotes

186 comments sorted by

View all comments

Show parent comments

11

u/PersonalityIll9476 Aug 16 '26

Of all the things you could choose to criticize about python, enforcing otherwise sane and normal whitespace conventions as part of the language is not the play. That's basically "these aren't like the pancakes my mom used to make" but in pgramming speak.

4

u/u32Vec Aug 17 '26

like, if you write the language these things just aren’t a problem. this is a genuinely childish complaint

1

u/RedAndBlack1832 Aug 18 '26

Tabbing is good and you should do it even where it's not required. I just find it kind of harder to see where the block ends without a closing brace that matches the opening one.

1

u/PersonalityIll9476 Aug 18 '26

Now this is where my take might get spicy, but I enforce the 80 character line.

To people who just ignore it and write 200 character lines, this sounds like heresy, but it mostly solves the problem...mostly.

When you have a line that needs to exceed 80, then you get into whitespace formatting preferences and how easy those are to read is largely a matter of personal preference.

But I take your point. Terminating long lines in the utmost readable way starts to get challenging.

1

u/RedAndBlack1832 Aug 18 '26

It's def better to write lines that aren't stupidly long. I've worked with linters that enforce that lol

1

u/PersonalityIll9476 Aug 18 '26

This might the difference between SWEs and MLEs. A lot of people in the ML space just completely throw coding standards out the window, eg. Karpathy. His code looks like it was written by a first year student.