Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pure OO

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does one define Pure OO language?
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Practically speaking, a pure OO language has no native, primitive or terminal types in it. SmallTalk is one example.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And pragmatically, one doesn't...
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about C#?
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C# has all three no-no's in it. Not even close.
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about Object Pascal, Ada and Eiffel?
Does Ada belongs to a OO language?
It is a lady name.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is autoboxing?
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
What is autoboxing?

See this conversation with Joshua Bloch
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are boiler plate code?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Robert Martin
Author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 372
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Pradip Bhat, are you the person thanked in the "Acknowledement" section of Head First EJB?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ilja.
 
Raghubir Bose
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
all operations are messages to objects


I love it when they talk like that.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic