hi

why java is a 100% pure oops language?
[45 byte] By [java_quesansa] at [2007-11-27 9:24:36]
# 1
It isn't
georgemca at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 2
Hmm a very similar post was added not so long ago with the OP wondering the exact same thing. I smell exam question!
ita6cgra at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 3
> why java is a 100% pure oops language?Every time you try executing your code you discover something that makes you say "oops"
aniseeda at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 4
well c++ supports pure multiple inheritance, but java do not support pure multiple inheritance.A class can't extend more than one class.But using implements interface, java tries to implemet multiple inheritance..If i'm wrong then anyone give the correct explanation...
sabyasachi.roya at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 5

> well c++ supports pure multiple inheritance, but java

> do not support pure multiple inheritance.A class

> can't extend more than one class.But using implements

> interface, java tries to implemet multiple

> inheritance..If i'm wrong then anyone give the

> correct explanation...

What does any of that have to do with OO purity though? Never heard of multiple inheritance being described as pure, either

georgemca at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 6

what i mean to say is that in c++ a class can extend more than one class, but in java we can't do so..using implemet keyword we can implement interface to implement multiple inheritance.

The pure word denotes the direct implementation of multiple inheritance not the indirect one as in java..so this is one reason java is known to be not 100 % object oriented language..

sabyasachi.roya at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 7

On "purity" as a measure of object-orientedness:

However, this definition is problematic in that it implies that "purity" is a valid concept. Yet, there is no accepted definition of the term "pure OO language". Despite years of discussion and argument on the net, and in other circles, I have never seen anyone present a definition of a "pure OOPL" that met with general agreement by others.

-- Robert Martin, founder, CEO, and president of Object Mentor Inc., software industry leader.

On the value of using "purity" as a measure of a programming language:

I will not go into the discussion about ``purity'' beyond mentioning that I think that a general purpose programming language ought to and can support more than one programming style (``paradigm'').

-- Bjarne Stroustrup, designer and implementer of the C++ programming language, etc.

~

yawmarka at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 8

> what i mean to say is that in c++ a class can extend

> more than one class, but in java we can't do

> so..using implemet keyword we can implement interface

> to implement multiple inheritance.

Agreed

> The pure word denotes the direct implementation of

> multiple inheritance not the indirect one as in

> java..so this is one reason java is known to be not

> 100 % object oriented language..

Why is the use of interfaces any less multiple inheritance than extending multiple classes? It's a more useful form of MI, if you ask me. Who cares that you can be lazy and inherit code from other classes? Is that important when designing an object-oriented system? I say it's much more useful to be able to inherit types from other classes, which interfaces achieve rather well. Class inheritance - multiple or otherwise - isn't the solution to software reuse that people used to think it was. It also creates dependencies between concrete classes, and we all know that's a bad idea.....

Still nothing to do with "purity", either

georgemca at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 9

Many languages claim to be Object-Oriented. While the exact definition of the term is highly variable depending upon who you ask, there are several qualities that most will agree an Object-Oriented language should have:

1->Encapsulation/Information Hiding

2->Inheritance

3->Polymorphism/Dynamic Binding

4->All pre-defined types are Objects

5->All operations performed by sending messages to Objects

6->All user-defined types are Objects

For the purposes of this discussion, a language is considered to be a "pure" Object-Oriented languages if it satisfies all of these qualities. A "hybrid" language may support some of these qualities, but not all. In particular, many languages support the first three qualities, but not the final three.

Eiffel, Smalltalk, and Ruby are all pure Object-Oriented languages, supporting all six qualities

Java claims to be a pure Object-Oriented language, but by its inclusion of "basic" types that are not objects, it fails to meet our fourth quality. It fails also to meet quality five by implementing basic arithmetic as built-in operators, rather than messages to objects.

sabyasachi.roya at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 10

> Many languages claim to be Object-Oriented. While the

> exact definition of the term is highly variable

> depending upon who you ask, there are several

> qualities that most will agree an Object-Oriented

> language should have:

> 1->Encapsulation/Information Hiding

> 2->Inheritance

> 3->Polymorphism/Dynamic Binding

> 4->All pre-defined types are Objects

> 5->All operations performed by sending messages to

> Objects

> 6->All user-defined types are Objects

>

> For the purposes of this discussion, a language is

> considered to be a "pure" Object-Oriented languages

> if it satisfies all of these qualities. A "hybrid"

> language may support some of these qualities, but not

> all. In particular, many languages support the first

> three qualities, but not the final three.

>

> Eiffel, Smalltalk, and Ruby are all pure

> Object-Oriented languages, supporting all six

> qualities

>

> Java claims to be a pure Object-Oriented language,

> but by its inclusion of "basic" types that are not

> objects, it fails to meet our fourth quality. It

> fails also to meet quality five by implementing basic

> arithmetic as built-in operators, rather than

> messages to objects.

I'll give you 50 dukes if you can satisfactorily explain why any of that makes any difference to how you write code, or your choice of language

georgemca at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 11

> I'll give you 50 dukes if you can satisfactorily

> explain why any of that makes any difference to how

> you write code, or your choice of language

Python is often heralded as an Object-Oriented language, but its support for Object-Orientation seems to have been tacked on. Some operations are implemented as methods, while others are implemented as global functions. Also, the need for an explicit "self" parameter for methods is awkward. Some complain about Python's lack of "private" or "hidden" attributes, which goes against the Encapsulation/Information Hiding principle, while others feel that Python's "privateness is by convention" approach offers all of the practical benefits as language-enforced encapsulation without the hassle. The Ruby language, on the other hand, was created in part as a reaction to Python. The designer of Ruby decided that he wanted something "more powerful than Perl, and more Object-Oriented than Python.

sabyasachi.roya at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 12
> Many languages claim to be Object-Oriented... It's considered poor form not to credit your sources when you copy and paste someone else's work. http://www.jvoegele.com/software/langcomp.html~
yawmarka at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 13
> Python is often heralded as an Object-Oriented language...Ditto. http://www.jvoegele.com/software/langcomp.html~
yawmarka at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 14

> > I'll give you 50 dukes if you can satisfactorily

> > explain why any of that makes any difference to

> how

> > you write code, or your choice of language

>

> Python is often heralded as an Object-Oriented

> language, but its support for Object-Orientation

> seems to have been tacked on. Some operations are

> implemented as methods, while others are implemented

> as global functions. Also, the need for an explicit

> "self" parameter for methods is awkward. Some

> complain about Python's lack of "private" or "hidden"

> attributes, which goes against the

> Encapsulation/Information Hiding principle, while

> others feel that Python's "privateness is by

> convention" approach offers all of the practical

> benefits as language-enforced encapsulation without

> the hassle. The Ruby language, on the other hand, was

> created in part as a reaction to Python. The designer

> of Ruby decided that he wanted something "more

> powerful than Perl, and more Object-Oriented than

> Python.

So with that in mind, how would you apply that knowledge that you lifted from http://www.jvoegele.com/software/langcomp.html to a decision about which language to use for a particular project?

georgemca at 2007-7-12 22:20:36 > top of Java-index,Java Essentials,Java Programming...
# 15

> > I'll give you 50 dukes if you can satisfactorily

> > explain why any of that makes any difference to

> how

> > you write code, or your choice of language

>

Object-oriented programming languages (OOPLs) are the natural choice for implementation of an Object-Oriented Design because they directly support the object notions of classes, inheritance, information hiding, and dynamic binding. Because they support these object notions, OOPLs make an object-oriented design easier to implement . An object-oriented system programmed with an OOPL results in less complexity in the system design and implementation, which can lead to an increase in maintainability.

Object-oriented (OO) applications can be written in either conventional languages or OOPLs, but they are much easier to write in languages especially designed for OO programming. OO language experts divide OOPLs into two categories, hybrid languages and pure OO languages. Hybrid languages are based on some non-OO model that has been enhanced with OO concepts. C++ , Ada 95, and CLOS (an object-enhanced version of LISP) are hybrid languages.

Pure OO languages are based entirely on OO principles; Smalltalk, Eiffel, and Simula are pure OO languages.

sabyasachi.roya at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 16

> > > I'll give you 50 dukes if you can satisfactorily

> > > explain why any of that makes any difference to

> > how

> > > you write code, or your choice of language

> >

>

> Object-oriented programming languages (OOPLs) are the

> natural choice for implementation of an

> Object-Oriented Design because they directly support

> the object notions of classes, inheritance,

> information hiding, and dynamic binding. Because they

> support these object notions, OOPLs make an

> object-oriented design easier to implement . An

> object-oriented system programmed with an OOPL

> results in less complexity in the system design and

> implementation, which can lead to an increase in

> maintainability.

>

> Object-oriented (OO) applications can be written in

> either conventional languages or OOPLs, but they are

> much easier to write in languages especially designed

> for OO programming. OO language experts divide OOPLs

> into two categories, hybrid languages and pure OO

> languages. Hybrid languages are based on some non-OO

> model that has been enhanced with OO concepts. C++ ,

> Ada 95, and CLOS (an object-enhanced version of LISP)

> are hybrid languages.

>

> Pure OO languages are based entirely on OO

> principles; Smalltalk, Eiffel, and Simula are pure

> OO languages.

Is this your thing, is it? Blindly plagiarize other people's writings and pass it off as your own argument? You might want to at least read some of it first, to see if it actually addresses the questions you're avoiding

I'd like to know what you think on this matter. So far, by implication and by reading your evidence, you think Java is a poor choice as a language because it doesn't qualify as 100% OO according to some arbitrary rules you found on Google

What features of Java do you think are a hindrance to implementing an object-oriented design?

georgemca at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 17

> > Python is often heralded as an Object-Oriented

> language...

>

> Ditto.

>

> http://www.jvoegele.com/software/langcomp.html

>

> ~

well i don't want any credit of mine...that i'm writing in this forum...ya i copied that as it supports our discussion...the same as u pasted some quote of

On "purity" as a measure of object-orientedness:

However, this definition is problematic in that it implies that "purity" is a valid concept. Yet, there is no accepted definition of the term "pure OO language". Despite years of discussion and argument on the net, and in other circles, I have never seen anyone present a definition of a "pure OOPL" that met with general agreement by others.

-- Robert Martin, founder, CEO, and president of Object Mentor Inc., software industry leader.

On the value of using "purity" as a measure of a programming language:

I will not go into the discussion about ``purity'' beyond mentioning that I think that a general purpose programming language ought to and can support more than one programming style (``paradigm'').

-- Bjarne Stroustrup, designer and implementer of the C++ programming language, etc.

But in a hurry i forgot to paste the link in forum.....is that the fault?

sabyasachi.roya at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 18

> > > Python is often heralded as an

> Object-Oriented

> > language...

> >

> > Ditto.

> >

> > http://www.jvoegele.com/software/langcomp.html

> >

> > ~

>

> well i don't want any credit of mine...that i'm

> writing in this forum...ya i copied that as it

> supports our discussion...the same as u pasted some

> quote of

Yawmark made it perfectly clear he was quoting someone else's work

> On "purity" as a measure of object-orientedness:

>

> However, this definition is problematic in that it

> implies that "purity" is a valid concept. Yet, there

> is no accepted definition of the term "pure OO

> language". Despite years of discussion and argument

> on the net, and in other circles, I have never seen

> anyone present a definition of a "pure OOPL" that met

> with general agreement by others.

> -- Robert Martin, founder, CEO, and president of

> Object Mentor Inc., software industry leader.

>

> On the value of using "purity" as a measure of a

> programming language:

>

> I will not go into the discussion about ``purity''

> beyond mentioning that I think that a general purpose

> programming language ought to and can support more

> than one programming style (``paradigm'').

> -- Bjarne Stroustrup, designer and implementer of the

> C++ programming language, etc.

>

> But in a hurry i forgot to paste the link in

> forum.....is that the fault?

You didn't forget because you repeated the "mistake" again. At no point have you offered any opinion of your own, and at no point have you even hinted that you were presenting someone elses work as supporting evidence. What you have posted does not actually address the questions it was meant to, either.

georgemca at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 19

hey it's java and c++ which i know..I will always go for java to implement any ooad.as u asked personally this is my personal reply...But i pasted something cause it was giving information regarding the topic of our discussion.and i don't want any credit here for answering the questions.I come to the forum just to express my knowledge,if i'm wrong rectify them and to know abt the topics which i'm not aware of...May be you all are more experienced than myself as a programmer or designer or analyst...But i'm not afraid of anyone here how much knowledgable be they to express my view maybe with a little support from google.

sabyasachi.roya at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 20

> hey it's java and c++ which i know..I will always go

> for java to implement any ooad.as u asked personally

> this is my personal reply...But i pasted something

> cause it was giving information regarding the topic

> of our discussion.and i don't want any credit here

> for answering the questions.I come to the forum just

> to express my knowledge,if i'm wrong rectify them and

> to know abt the topics which i'm not aware of...May

> be you all are more experienced than myself as a

> programmer or designer or analyst...But i'm not

> afraid of anyone here how much knowledgable be they

> to express my view maybe with a little support from

> google.

But that's not what you did. Several times, you simply pasted in whole chunks of someone else's writings in response to a question. Said chunks didn't even address the issue-at-hand. I haven't seen you admit to being wrong yet, either

You owe me 50 dukes :)

georgemca at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 21

> But that's not what you did. Several times, you

> simply pasted in whole chunks of someone else's

> writings in response to a question. Said chunks

> didn't even address the issue-at-hand. I haven't seen

> you admit to being wrong yet, either

>

> You owe me 50 dukes :)

ha ha lol.....i don't even have 50 dukes in my account...u said u would give me...i never said it...ok i was not aware of that rule of the forum..hence forth i will take care not to copy paste but rather edit intelligently so that none of the guys here can recognise it as a work of someone else.(as the experienced guys might be doing.)

):

sabyasachi.roya at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 22

> > But that's not what you did. Several times, you

> > simply pasted in whole chunks of someone else's

> > writings in response to a question. Said chunks

> > didn't even address the issue-at-hand. I haven't

> seen

> > you admit to being wrong yet, either

> >

> > You owe me 50 dukes :)

>

> ha ha lol.....i don't even have 50 dukes in my

> account...u said u would give me...i never said

> it...ok i was not aware of that rule of the

> forum..hence forth i will take care not to copy paste

> but rather edit intelligently so that none of the

> guys here can recognise it as a work of someone

> else.(as the experienced guys might be doing.)

> ):

It's not a rule of the forum, it's common courtesy!

Rather than copy/paste, or edit intelligently, why not just form your own opinion, and use other people's work as supporting evidence? It's a lot simpler than trying to make something you don't understand sound like it's yours

georgemca at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...
# 23

> the same as u pasted some quote...

The difference is that I credited my sources, and clearly let people know that I was quoting someone else's work, not mine.

If you're interested in my personal opinion, I tend to agree with the quotes I posted and find arguments as to the alleged purity (or lack thereof) of Java as an OO language to be largely academic and of no substantial value to actual development. In other words, it simply doesn't matter to me whether or not Java fits someone's idea of what 100% pure OO means (as if there were something like 87.2% pure OO). And I've yet to see a discussion on this forum on this topic that resulted in any sort of agreement or enlightenment, aside from the point that the OO "purity" of Java is both subjective and irrelevant to practical usage. It might be a good question for the classroom, to get students to think about what constitutes OOP, but the question is typically not of much interest to pragmatic developers.

~

yawmarka at 2007-7-21 23:00:58 > top of Java-index,Java Essentials,Java Programming...