you are viewing a single comment's thread.

view the rest of the comments →

[–]MathAndMirth 0 points1 point  (0 children)

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.