aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Pure OO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Pure OO" Watch "Pure OO" New topic
Author

Pure OO

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

How does one define Pure OO language?


Groovy
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Practically speaking, a pure OO language has no native, primitive or terminal types in it. SmallTalk is one example.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
And pragmatically, one doesn't...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

What about C#?
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

C# has all three no-no's in it. Not even close.
Francis Siu
Ranch Hand

Joined: Jan 04, 2003
Posts: 867
How about Object Pascal, Ada and Eiffel?
Does Ada belongs to a OO language?
It is a lady name.


Francis Siu
SCJP, MCDBA
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Great link
http://www.jvoegele.com/software/langcomp.html
Francis Siu
Ranch Hand

Joined: Jan 04, 2003
Posts: 867
Ar yes
Pradeep
I read the linkage, but it does not contains the detail with Ada and Object Pascal, I think that both of it belongs to Pure OO.
Any idea
:roll:
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

http://www.coderanch.com/t/97015/patterns/Java-Pure-OO
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Another thing that makes Smalltalk more OO than Java is that all control structures are implemented in methods.
For example, Boolean objects understand the message ifTrue, which gets a block as a parameter. The implementation on True executes the block, the one on False doesn't. Similar for loops etc.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I had a solid Pascal background and when I started on a SmallTalk project, I kept asking for the language syntax, reserved words, etc. Essentially there are none. The compiler recognizes a couple punctuation marks and the SmallTalk universe is written in itself from there. It's a stunningly beautiful thing.
Java primitives are damned frustrating. I'm really looking forward to autoboxing!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

What is autoboxing?
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4753
    
    7

Originally posted by Pradeep Bhat:
What is autoboxing?

See this conversation with Joshua Bloch


Junilu - [How to Ask Questions] [How to Answer Questions]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

What are boiler plate code?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What are boiler plate code?

Boiler plate code is the trivial "support" code that you don't like writing but hope you could delegate to the compiler, code generator, etc.
[ September 10, 2003: Message edited by: Lasse Koskela ]

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Robert Martin
Author
Ranch Hand

Joined: Jul 02, 2003
Posts: 76
Originally posted by Pradeep Bhat:
How does one define Pure OO language?

The search for that definition is fruitless. OO is not a pure concept. OO is a set of tools and techniques that have accumulated over the years. Each person keeps a set of these tools and techniques that they call OO, but no two people have the same things in their set. An intersection of all the sets belonging to all the people would result in the null set, or at most a set that nobody would accept as useful.
OO is not a philosophy. It is not a religion. It is not something that can be said to be "pure" any more than software itself can be said to be "pure".
Asking what defines pure OO is like asking what defines pure English. The notion of "purity" is meaningless in that context. However, that does not make the concept useless.


---<br />Uncle Bob.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

I was reading Ruby tutorial where it is mentioned that Ruby is a genuine (I imply it to be pure) OO langauge. By definition in a pure OOP langauge everything is a object but in Ruby I noticed if statemet




Is the above if statement OO?

Thanks.
B.Sathish
Ranch Hand

Joined: Aug 18, 2005
Posts: 372
Hey Pradip Bhat, are you the person thanked in the "Acknowledement" section of Head First EJB?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by B Sathish:
Hey Pradip Bhat, are you the person thanked in the "Acknowledement" section of Head First EJB?


As this has nothing to do with this thread at all, please take this to another forum - for example private messages. Thanks!
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Pradip Bhat:


Is the above if statement OO?
[/QB]


That depends on how it is implemented.

Anyway, I really don't think that calling a language "pure OO" makes much sense (besides for marketing :rolleyes . For example, I just found a language called "Io" which is said to be even "more pure OO" than Ruby because even assignments are method calls...
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by Ilja Preuss:


Is the above if statement OO?


That depends on how it is implemented.

Anyway, I really don't think that calling a language "pure OO" makes much sense (besides for marketing :rolleyes . For example, I just found a language called "Io" which is said to be even "more pure OO" than Ruby because even assignments are method calls... [/QB]
</blockquote>

Thanks Ilja. In a pure OO language everything is a object. I haven't understood how the above if statement becomes OO compliant. Could you please tell the object(s) in the above 'if' statement.Thanks.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by B Sathish:
Hey Pradip Bhat, are you the person thanked in the "Acknowledement" section of Head First EJB?


Yes.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Pradip Bhat:


Is the above if statement OO?


That depends on how it is implemented.

Anyway, I really don't think that calling a language "pure OO" makes much sense (besides for marketing :rolleyes . For example, I just found a language called "Io" which is said to be even "more pure OO" than Ruby because even assignments are method calls... [/QB]
</blockquote>

Thanks Ilja. In a pure OO language everything is a object. I haven't understood how the above if statement becomes OO compliant. Could you please tell the object(s) in the above 'if' statement.Thanks.[/QB]
</blockquote>

It *could* be something like



Or, more Smalltalk-like



But I don't know Ruby well enough to say how it actually *is* implemented.
Raghubir Bose
Ranch Hand

Joined: Feb 18, 2006
Posts: 88
I read that Ruby is a pure OO scripting language , can any body tell me the difference between oo scripting and oo programming language. From my knowledge smalltalk is a pure oo language where everything is object..but that is a programming language ...this is a scripting language !! isnt scripting language inherently procedural


I will meet the fairy queen soon !
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
No, a scripting language doesn't need to be procedural. See http://en.wikipedia.org/wiki/Scripting_language for a good explanation.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Thanks Ilja.
Raghubir Bose
Ranch Hand

Joined: Feb 18, 2006
Posts: 88
Thanks Ilja for the Update !!!

See the link http://www.cs.washington.edu/homes/kd/courses/pythonruby.pdf

It says .."In contrast, Ruby is pure object oriented language (like Smalltalk). As in Python, in Ruby everything is an object. There are no built-in types like int in Java. The part which is different from Python is the fact that all operations are messages to objects. i.e. there are no functions, only methods. Though it is possible in Ruby to write a method without defning a class, what Ruby does, is that it makes this method a private method of the Object class. This allows Ruby to look like a procedural language, even though it is a pure OO language"
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
all operations are messages to objects


I love it when they talk like that.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Raghubir Bose:
It says .."In contrast, Ruby is pure object oriented language (like Smalltalk). As in Python, in Ruby everything is an object. There are no built-in types like int in Java. The part which is different from Python is the fact that all operations are messages to objects. i.e. there are no functions, only methods. Though it is possible in Ruby to write a method without defning a class, what Ruby does, is that it makes this method a private method of the Object class. This allows Ruby to look like a procedural language, even though it is a pure OO language"


Yes, I read that. I didn't find anything about how control structures ("if" statements etc.) are implemented in Ruby. I Smalltalk they are messages to objects.
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

Originally posted by Michael Ernest
Practically speaking, a pure OO language has no native, primitive or terminal types in it. SmallTalk is one example.


I had never heard of native and terminal types. I appreciate if someone can throw light on this.


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pure OO