Wednesday, June 23, 2010

The Concept of pure object oriented Language

There are following pointswhich need tobe fulfilled by a pureobject oriented language:-

1. C++ allows writing global functions, outside of any class,
while in C# and Java all methods (functions) must be
included in a class.

2. According to "Pure" object oriented principle, no
method/routine should exist without the object. In C++, main
() method can be independant and does not need any class
but Java/C# its static method of "some" class.

3. C++ provides "Friends" which is absolute corruption to
the OO-Principle of encapsulation.

4. According OO-Principle, everything needs to be object.
C++ provide inbuilt datatype- int,float etc which are not
object in their nature. C#/Java also provides same kind of
datatype but its inner presentation is always object. For
example: in java you have got wrapper classes and in C#,
all these types are derived from System.ValueType object.

5. According OO-Principle, one object should have only one
hierarchical parent reference. In C++, Multiple-Inheritance
contradicts this principle.