Jump to content
  • Advertisement
Sign in to follow this  
2DExtremeOwner

1 Q about Java and Python

This topic is 4799 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Which one of them is more of an OOP suporter? In the future i would like to try to make a compiler and since OOP is said to be one of the best or the best style of programming then I think I should learn more about its style and the way it works. Thanx alot guys

Share this post


Link to post
Share on other sites
Advertisement
Without directly answering your question, I'd like to make something clear:

There is no "best" style of programming.

In this case, we're referring to a programming "paradigm", and again I say there is none that is "best". Rather, a good programmer making a good program or library or API will use all of the various tools at his disposal where they make the most sense, including procedural programming, object-oriented programming, generics (templated) programming, and others. OOP makes sense in many cases, but in others procedural is much simpler and correlates better with the functionality, for example.

Thank you,
Twilight Dragon

Share this post


Link to post
Share on other sites
First off i just heard OOP is great for Game Programming,THEN i got to the Begginers like i should and check the languages and there is NO Python i only see Java and it says:

"While not an official "sequel" to C++, Java borrows very heavily from C++ syntax. It dumps many of the more difficult C++ features to reveal a rather compact and easy-to-learn language. """""Unlike C++, Java enforces object-orientation with a heavy hand.""""" Writing a non-OO app in Java is as difficult as writing spaghetti-code in Pascal."

So asking somehting that ISNT in there shoudnt be hard to answer?

Share this post


Link to post
Share on other sites
Java, and many languages (possibly Python, I don't know), fully support OOP.

If you are interested in learning about OOP, you should try reading this.

As to which supports OOP more, I can't answer. As far as I know, a language either supports OOP, or it doesn't; although it may be possible to use objects without being object oriented.

Share this post


Link to post
Share on other sites
Quote:
Original post by 2DExtremeOwner
Which one of them is more of an OOP suporter?

Who cares? A better question is which one of them lets you get your job done faster and with less trouble.
Quote:
Original post by 2DExtremeOwner
OOP is said to be one of the best or the best style of programming

Said by who? Most people who say this aren't even aware of existance of non-mainstream languages like Lisp, Erlang or Haskell.

Do yourself a favor and go with Python. It supports OOP and a bunch of other things Java can't even dream of.

Share this post


Link to post
Share on other sites
To answer this question requires a proper definition of OOP, and if you asked the top ten bigwigs in this area, you'd probably get at least twenty candidate answers. :/

That said:

Java is designed more to enforce the OOP style: it includes checking for public/protected/private access, and makes you wrap every bit of code into a class. Python does neither of those, but it does a much better job of exhibiting the "everything is an object" philosophy: while you can have free functions, the *function itself* is an object, and the class of an object is also an object (metaclassing), and other stuff like that. That lets you do lots of useful things like aliasing functions, dispatch to functions from text input without building a lookup yourself (reflection), etc.

This wiki page is relevant, too. There are many who argue that Smalltalk is the only language that comes close to REAL OOP, "and even then, ...".

Share this post


Link to post
Share on other sites
@2DExtremeOwner: Judging by this and some other posts you've done really, I'd say you really should just learn any language. Every language has its supporters and detractors. And explaining the real differences to a non-programmer will just confuse them. Choose a language and get to the point where you can write a text-based tic-tac-toe (or similar) And then decide if you like it.

Good luck

Share this post


Link to post
Share on other sites
I don't know about python ,but Java is a purely oop language.Because in Java you can't program without OOP ,but python is optional so you can use procedural or oop

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!