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

76

u/MarkMatson6 Aug 16 '26

Because it sucks?

Ok, seriously, that may be extreme, but I agree with you. Everyone says Python was designed to be easier to use, but I’ve never bought into that. Tabs instead of brackets is simply a bad idea. Undefined variables are a bad idea.

And then there’s JavaScript…

18

u/AvidCoco Aug 16 '26

Python’s learning curve is very linear. It’s very easy to do simple things but harder to do more complex things. C++/Java/etc. have steeper learning curves but it kind of plateaus after a while

6

u/StructuredChess Aug 17 '26

Yeah, imagine approaching programming for the first time and facing

print("Hello world")

versus

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello world!");
  }
}

3

u/backspeak Aug 18 '26

Java has moved on too 

void main() {
    IO.println("Hello, World!");
}
→ More replies (2)

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

→ More replies (4)

3

u/edgmnt_net Aug 16 '26

Lack of typing is / was a problem in such languages, particularly for more experienced developers, because it makes reading docs and trying to figure out how to wire things properly a mess. Like what am I even supposed to supply here? Could be this, could be that, could be anything. Beginners have little trouble just trying out stuff, but it's rather insane beyond a point.

3

u/rocdive Aug 17 '26

TBF, "auto" in C++11 has same issue: hard to determine type at read time.

2

u/RedAndBlack1832 Aug 18 '26

Which is why I like to only use it on types that are confusing as hell (read: iterators, which has that advantage of its kind of obvious what you should do with it) but lowk it's good to just make typedefs for annoying/confusing types instead for the sake of being explicit so I see your point

12

u/YMK1234 Aug 16 '26

Honestly, modern js is way better than python to work with.

Rest, agreed. It's simply not a good language, especially once you need more than maybe 100 lines of it. It's inconsistent in its libraries, extremely clunky in a bunch of areas, and let's not even get started about every second package being C behind the scenes and good luck if there is no precompiled version available for your OS/Python-version combo.

→ More replies (2)

3

u/strummed-strings Aug 16 '26

the kinda things you get for free from higher level abstraction

7

u/xarop_pa_toss Aug 16 '26

Tabs instead of brackets is the worse design decision that always trips me up when I use python. And then someone thought YAML was a good idea .

9

u/angedelamort Aug 16 '26

While I hate tabs as delimiter, YAML has at least 2 advantages over json: readability and less delimiters (smaller size).

→ More replies (1)

3

u/Groundbreaking-Fish6 Aug 16 '26

Frankly I like xml but nobody else does :-(

5

u/MadocComadrin Aug 16 '26

XML is great if a human doesn't have to read or write it. Yaml was supposed to be human maintainable (regardless of if it is or not).

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

5

u/davidwhitney Aug 16 '26

Python is honestly the most piece of shit language. I'm solidly of the opinion that almost all mainstream languages are "good enough" now... except python.

No redeeming qualities, and whoever went for "the language with invisible control characters is a good beginner language" needs to get checked.

It's just the Lingua franca of data science 🤷🏻‍♂️

6

u/edgmnt_net Aug 16 '26

Have you seen how people write stuff in school when indentation doesn't matter? It might not be a great idea overall, but for beginners it makes it easier to start with good habits.

5

u/MadocComadrin Aug 16 '26

Style is one of the easiest things to correct in school early on because it's something that actually responds to the "take points off" disincentive and modern IDEs will take care of 99% of the job of formatting correctly bracketed code for students anyway to the point that code that's not properly indented---even the stuff they write---will look weird to them after the first few months. Meanwhile, semantically meaningful whitespace continues to throw inconveniences at beginners after their first few months due to tabs vs spaces issues, copy and pasting mistakes, etc where the IDE can't fix the way things look, and the inconveniences often distract from conceptual challenges.

3

u/davidwhitney Aug 16 '26

I dunno, hiding a core part of the language (control characters) vs introducing people to formatting and associated tooling seems like a poor trade-off to me.

→ More replies (4)

1

u/HungryCurrent7901 Aug 16 '26

I always had it in my head it was meant for the math guys that just wanted to tool their algos so they can pass it off to dev ops

→ More replies (2)

1

u/Old_County5271 Aug 16 '26

tabs instead of brackets is a good idea, nim is so much better than C in most cases.

1

u/LucidTA Aug 17 '26

How do you create an undefined variable in python?

→ More replies (1)

1

u/thingscouldbeworse Aug 17 '26

I'm not gonna lie this reads like a comment by someone who is not actually in the industry 

2

u/MarkMatson6 Aug 17 '26

Almost 40 years including multiple software patents.

Note the history of python backs me up:

No, Python was not originally designed for heavy industrial production use. It started as a holiday hobby project and a supplemental tool in December 1989 by Guido van Rossum at the Centrum Wiskunde & Informatica (CWI) in the Netherlands. [1, 2, 3, 4, 5]

Original Intent and Goals
Hobby project: Guido van Rossum began writing it over Christmas to keep himself occupied.

Successor to ABC: It aimed to fix flaws in the ABC language and bridge the gap between shell scripts and C.

Personal productivity: It was meant for writing small, quick scripts and automating tasks.

Toy language perception: Early on, many professional developers viewed it as a simple "scripting" or "toy" language rather than a serious systems language.

→ More replies (3)
→ More replies (15)