Can C++ is pure oop Language??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can C++ is pure oop Language???

if yes than reason tell me and no than also tell me why it is not...

19th Jan 2018, 4:59 PM
Bhumi Kachhiya
Bhumi Kachhiya - avatar
5 Answers
+ 4
@Rohit: You don't necessarily require classes for OOP. You need objects. Classes are important in type-safe languages. Compare JavaScript's prototype mechanism or object keywords in Scala and Kotlin. In fact, classes are contraindication for OOP, if the language also has the static keyword.
20th Jan 2018, 5:33 PM
1of3
1of3 - avatar
+ 3
I'd argue that even Java is not pure OOP, since there are things that aren't objects. So no, C++ certainly isn't pure.
20th Jan 2018, 2:24 AM
1of3
1of3 - avatar
+ 2
I'm pretty sure it's an OOP language. Correct me if I'm wrong.
19th Jan 2018, 5:31 PM
Robyn A
Robyn A - avatar
0
@Rubyn_A c++ is not pure oop
21st Jan 2018, 4:43 AM
Bhumi Kachhiya
Bhumi Kachhiya - avatar
- 1
No. Objects protect their data. Not classes. Classes just say: All these objects behave the same way. They are just syntax, not any underlying principle. Look at Actor models. All objects have the same interface and only have the ability to receive messages. That is how OOP was first done. Objects communicate with messages. Classes came later. Don't let the fact fool you that you know only C++ and Java.
20th Jan 2018, 5:55 PM
1of3
1of3 - avatar