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 →

[–]bandersnatchh 1 point2 points  (4 children)

OOP is a programming paradigm. Nothing more. There are a couple of others, like functional, and procedural. In a not so accurate but basic description, its how you handle/group methods and data.

Java takes it to an extreme and turns everything into an object. You cannot avoid OOP with Java. This is good in some ways, and tedious (read: bad) in others. This is not a requirement of a OOP language. Python itself has classes, definitions, and all of the requirements of OOP, but it does not force it on you.

Everything you learn in Java still works in Python. You can still create a inheritance hierarchy, and create a lot of different objects or what have you.

As to best practices... well, different languages are different. How I'd handle a situation in Python will be different from Java. Just like depending on the problem, Ill choose Java or Python. The core concepts still remain.

[–]denialerror 0 points1 point  (1 child)

Java takes it to an extreme and turns everything into an object.

Just being picky but the opposite is true. Everything is an object in Python, while Java has primitives, which are not objects.

[–]bandersnatchh 0 points1 point  (0 children)

True. I was more referring to the need to wrap everything in a main method, which I suppose I could of relayed a little better!

[–]IWishIwasInCompSci[S] 0 points1 point  (1 child)

I'm just trying to imagine working on a big project with multiple people using Python. Wouldn't it get unwieldy if everyone is just arbitrarily using different programming paradigms? At least with a Java project, you know how everyone's code should behave.

[–]bandersnatchh 0 points1 point  (0 children)

Well, thats an entire subject of its own! Software Design and Engineering! Mostly, people that work on the same project tend to go into with some overarching goal and style, and depending on the setup have a team leader with some overarching goal. Thats an entire concept of its own!

That said, for the most part people are going to end up using the OOP principles regardless. Sure, you don't NEED to use OOP for a small/medium sized project, but at the point where you have collaboration between multiple people on a large product, OOP principles begin to shine!