C++/OOPs

Advertisement


Question
substantiate the statement “C++ is not a pure Object Oriented language”.

Answer
C++ Is not a pure object Oriented language !

1.Classes may be created or modified during runtime, a feature that C++ does not support.

2.Some programming situations demand runtime creation of new classes:

  1. If a large number of different classes are required to design the solution, then it will be efficient to create them at runtime as needed.
  2. If all classes required at runtime are not known at compile time.
  3. Requirements for new classes arise dynamically. In a programming language with statically created classes, it will be required to re-program with new classes and re-compile. This will lead to system downtime, which can be avoided by having support for runtime class creation.

In C++, a class is completely defined by a syntactic construct and once it is defined, it cannot be modified in runtime. In contrast, programming languages  Smalltalk supports that the classes are created by a sequence of runtime steps. When a method is added, it is compiled right away and added into the development/runtime environment immediately and is available for use in subsequent programming steps. This is what c++ lags in thats why C++ is not a purely object oriented programming language !

Regards
Prince M. Premnath!  

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Prince M. Premnath

Expertise

Years of research in C/C++ Will bring you all facts regarding , OOPS , SVGA , MOUSE , BIOS , IVT , Feel free to query me :-)

Experience

More than 5 years

Education/Credentials
MCA

©2016 About.com. All rights reserved.