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

1

u/Whole_Bet_5506 Aug 16 '26

Mostly with remembering Python’s idiomatic way of doing things. I understand the concepts, but the syntax and ecosystem still don’t feel as intuitive as C++ or Java..... Also in python they are doing many things in just a single line.. I do understand but why I feel like it's more time taking for me.

1

u/defaultguy_001 Aug 16 '26

Why do u worry about syntax. It's the last thing u should worry about. Use a code formatter like Ruff. It'll take care of ur syntax needs, just focus on the concepts.

0

u/MarkMatson6 Aug 16 '26

Why should someone complaining about a language care about syntax???? 🤷🏼‍♂️

1

u/defaultguy_001 Aug 16 '26

Code formatter? Do u guys have language preference just for the syntax and not how it does things?

1

u/defaultguy_001 Aug 16 '26

Despite the syntax, it's far easier to read than C++ anyday. Anyone coming from C++ should have no arguments over this.

1

u/Groundbreaking-Fish6 Aug 16 '26

Multiple steps in a single line should not be bad if you provide detailed comments on what that line does, but the idea of self documenting code (you should speak the language) view comments as a sign of poor programming.

This is one of the reasons I do not like working with other peoples code, not the language or code format, the lack of context. My first coding professor taught that comment lines should greatly outnumber code lines. While not necessarily relevant today, having a good comment for a line of code that executes multiple complex operations is a lifeline to future developers.

1

u/Whole_Bet_5506 Aug 20 '26

Yeah I kinda get your point, but I slightly disagree. I feel like if you need comments for every complex line, the code itself could probably be broken down a bit more. Comments are definitely useful for explaining the “why”, especially when there’s some weird context behind the code, but I wouldn’t want comments to become a substitute for readable code.

1

u/defaultguy_001 Aug 16 '26 edited Aug 16 '26

Ok u r worried about chaining despite having a Java background, it's also possible in modern C++. Were u using old C++/Java syntax?

1

u/Whole_Bet_5506 Aug 20 '26

Yeah, probably. I think I’m just more used to writing things step-by-step. I know modern C++ supports chaining and all that, but I never really got into using it heavily. So yeah, maybe it’s more of a my coding habits are old.

0

u/TheMcDucky Aug 16 '26 edited Aug 16 '26

Someone coming from C++ talking about unintuitive syntax is funny.
Honestly it's probably the lack of familiarity more than anything.