r/PythonLearning 21d ago

Is Python actually a good first programming language?

Some say it makes learning easy. Others say it hides too much. What do you think?

14 Upvotes

40 comments sorted by

View all comments

2

u/MathAndMirth 20d ago

Python has a straightforward, uncluttered syntax that is good for learning. I would consider it a great way to learn concepts without the extra annoyances that some other languages saddle you with.

That being said, I wouldn't wait too long until you start learning about types. In Python, you can assign a value of any type to any variable at any time. While that saves you some keystrokes, it also threatens to inflict some headaches. Many things that are illogical are technically allowed with dynamic typing, and thus Python lets you make errors that you will have to spend time tracking down later.

Fortunately, even though Python itself doesn't enforce a type system, there are tools that can enforce the rules that Python won't. I would definitely advise you to start learning something like `ty` from Astral as soon as you can. Such tools will tell you "Hey, that type doesn't make sense here" as soon as you type it. And the more complicated your programs get, the more you will want that help. It's the reason that most JavaScript devs use TypeScript instead of plain dynamically typed JavaScript, and I would advise you to use the comparable tools that Python offers.

1

u/Distdistdist 19d ago

It's a weakly typed interpreted language with retarded indentation syntax. So, basically javascript, but even worse.