aspose file tools*
The moose likes Java in General and the fly likes Java & c++ : Home of confusion ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java & c++ : Home of confusion ?" Watch "Java & c++ : Home of confusion ?" New topic
Author

Java & c++ : Home of confusion ?

Saurabh Agrawal
Ranch Hand

Joined: Oct 07, 2003
Posts: 244
Why java is not 100% pure OOP but c++ ?
I f someone says since java allows primitives therefore its is not 100% pure oop then i should ask that c++ also supports primitives and yet it is considered as 100% pure OOP??
I hope i get the reply soon by my friends here !!
Saurabh


Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Pierre Henry
Ranch Hand

Joined: Oct 01, 2003
Posts: 31
Neither Java nor C++ are 100% OO language, because the implementation
of the primitive types depends on the processor instruction set it's
being ported on.
Nevertheless, it's possible to create a Level instruction set on the
target processor that implements all the basic OO instructions like new so that primitive types should'nt be wrapped but would directly
represents processor register, wether in Java or in C++.
So does it mean Java and C++ are 100% OO ?
I don't think so.
I think a real 100% OO language is something like Smalltalk,
because even the block instruction are OO.
So even Java has a little work to do to gain OO heaven!


"A good method shouldn't bypass one screen long"<br />"genius is the knowledge left when one has forgotten everything"
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I f someone says since java allows primitives therefore its is not 100% pure oop then i should ask that c++ also supports primitives and yet it is considered as 100% pure OOP??
I don't think I've ever heard someone suggest that C++ is more "pure" OO than Java is. I would think it's somewhat less OO than Java is, but for good reason - C++ needed to maintain backward compatibility with C. More than Java did anyway. What gives you the idea that C++ is considered more pure OO?


"I'm not back." - Bill Harding, Twister
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java & c++ : Home of confusion ?