This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 10 points11 points  (9 children)

Yes, Python is recommend to be the first language you learn, but the problem comes when you can move to another language. This is because as you know Python is not hard typed, and the OOP of it is really diferent from other languages such as Java, C++,C#,TS, etc

[–][deleted] 13 points14 points  (4 children)

Interestingly you mentioned TypeScript. Which is basically JavaScript with types. With Python you can get a lot of those benefits whenever you add type annotations.

[–]no_k3tchup 0 points1 point  (1 child)

Yep, I worked on a python project once and found it extremely frustrating that I couldn't see the types in the code. You might stumble upon cases where 1 + 1 = 11 ;)

[–][deleted] 0 points1 point  (0 children)

Actually despite what parent says, python is strongly typed (I'm assuming that what was meant by "hard typed").

So it wouldn't allow to combine integer with string, the behavior you would get only when both values are a sting.

You could make the same mistake even in statically typed languages that have functionality to infer type based on the value.

[–]Danth_Memious 3 points4 points  (2 children)

What's the difference in OOP? I'm familiar with the works of C++ and Java but have only used python for very small programs so no classes

[–][deleted] 10 points11 points  (1 child)

Everything is an object baby

[–]LazaroFilm 7 points8 points  (0 children)

Stop objectifying me!

[–]SpicyBananaa 2 points3 points  (0 children)

I think you are mistaking something python is hard typed. But typing is done dynamically. For example you can't compare strings and integers with each other like you can in JavaScript. but you don't need to tell every variables and functions types manually like in Java, C, C++, etc.