+ 2

C++ is not pure object oriented programming language. Why?

6th Jan 2018, 6:11 AM
Shruti Pandya
Shruti Pandya - avatar
11 Antworten
+ 3
A pure Object Oriented language means that any value in the program is an object and not just a variable of a primitive type. Java, C++, etc are OOP languages, but none of them is a pure OOP language, as types like int, float, bool/boolean are not classes but are primitive types and do not have methods of their own. Ruby, Objective C, etc are more oriented towards being a pure OOP language, as every variable in these languages are objects. Even classes that define objects can be object instances of meta-classes. For more info: https://stackoverflow.com/questions/28672938/difference-between-pure-object-oriented-and-object-oriented-language https://www.quora.com/Is-ruby-pure-object-oriented-language https://stackoverflow.com/questions/7234185/what-are-some-of-the-most-pure-object-oriented-languages
6th Jan 2018, 3:22 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 4
In a completely OOP language like Java everything must be defined inside a Class (Even the main method). However in C++ you can write programs without having any classes(Structured Programming). Unlike Java, In C++ the main method is defined outside classes.
6th Jan 2018, 8:01 PM
Mahdi Hosseini
Mahdi Hosseini - avatar
+ 3
I think oops concept include abstraction, inheritance, encapsulation and polymorphism. in cpp u can achieve all these things.
6th Jan 2018, 7:57 AM
Arpit Srivastava
Arpit Srivastava - avatar
+ 3
cpp was first oop language but it is not platform independent
6th Jan 2018, 7:59 AM
Arpit Srivastava
Arpit Srivastava - avatar
+ 2
what do u mean by pure
6th Jan 2018, 6:12 AM
Arpit Srivastava
Arpit Srivastava - avatar
+ 1
pure means you can not able to say c++ is complete object oriented programming language.
6th Jan 2018, 6:15 AM
Shruti Pandya
Shruti Pandya - avatar
+ 1
@jayden lecorps I want reason ,not program.
6th Jan 2018, 6:32 AM
Shruti Pandya
Shruti Pandya - avatar
+ 1
becoz u interested in c++
4th Mar 2018, 4:32 PM
Akash
Akash - avatar
0
in c++, it's not necessary to create a class for a program. so we can say that it's not 💯% object oriented. while others like java , you must have a class.
6th Jan 2018, 9:10 AM
Aniket Maurya
Aniket Maurya - avatar