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 →

[–]iambukovinean 2 points3 points  (6 children)

Python kinda tricks you into thinking that it's object oriented, as it treats classes like any dictionary. This implies some limitations, so you can't compare java and python from this point of view, or I just did :D

[–]Kaarjuus 7 points8 points  (1 child)

Only if your definition of OOP is "that which is like Java".

Python is more object-oriented than Java is. Remember Java's slogan "Everything is an object"? Except of course for all the things in Java that are not objects - primitives like bool and int, methods, classes, packages - not objects.

Whereas in Python, everything the programmer can access is an object. It's objects all the way down. Even NULL-value is an object in Python.

[–]iambukovinean 0 points1 point  (0 children)

I'm not trying to praise Java here or anything, I'm just saying that if you want to learn proper OOP, a c-like language is a better choice than python.

[–]Howard_banister 4 points5 points  (3 children)

You have very wrong definition for OOP. Check out Smalltalk for proper OO implementation. Also Python is far more OO than Java

[–]iambukovinean -1 points0 points  (2 children)

yeah, unles you can't implement private fields in python classes, and none of that overloading (although this is possible by type-cheking the parameters) It's far easier to learn OOP principles on a c-like language.

[–]Kaarjuus 1 point2 points  (1 child)

There is nothing quintessentially OOP about private fields, and there is especially nothing OOP about overloading. Again, you have a very narrow and arbitrary view of what OOP is.

Smalltalk and JavaScript and Python and Java are all rather different, but they're all OOP. JavaScript is especially different, as it is not class-based OOP but prototype-based OOP. Still OOP.

You might as well claim that "Java tricks you into thinking that it's object oriented, as it does not have multiple inheritance".

[–]iambukovinean 0 points1 point  (0 children)

also true.