Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Java is pure object oriented language?

 
raul saini
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my version of explanation, but I'm not confident only with this.

Java is OO because, it simply can not work without objects. Even if in a simple program we have to use objects to call methods and variables.

Please elaborate.

Thank You
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would argue "no" because Java has primitives that are not objects such as int.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Raul: This question has been asked about a gabillion times here and elsewhere, so you may do best to SearchFirst.

Much luck!
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
raul saini wrote:Even if in a simple program we have to use objects to call methods and variables.

No you don't. A very easy example:
Sure, it doesn't do much, but there are absolutely no objects involved.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd argue I don't care anymore :)

I think Java is a poor example of an OO language, regardless of whether or not it's "pure"--and to me, that's a more important distinction. Part of it is a language design issue, part of it is how some things were implemented (I shouldn't need to use static methods from Arrays on an array), part of it is syntactic, part of it is the inability to have clean code reuse, part of it is that it just doesn't mesh with what I consider to be hallmarks of a powerful and effective language.

But no, I'd say it isn't pure, and more importantly, not very clean at all.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:
I'd argue I don't care anymore :)
//....
But no, I'd say it isn't pure, and more importantly, not very clean at all.


Sorry to get off topic, but this begs the question: which language do you feel best fulfills your criteria of a clean, relatively pure OOP (absolute purity is a bit over-rated), powerful and effective language?

Thanks!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My go-to answer for this question is Smalltalk, because it's been around forever and everybody knows what it is. (Or should.) That said, though, there are a number of other possibility "cleanliness" candidates, depending on various nuances of the question. I'm also increasingly happy with many of the choices on the JVM, although I don't know Scala well enough to have a reasoned opinion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic