Data-oriented programming (DOP) deals with data while object-oriented programming (OOP) deals with objects.
DOP data are not following a specific set of rules while OOP in the objects follows a specific rule.
There is a memory caching in DOP while there is no memory caching in OOP.
The DOP is more efficient than OOP.
There is no inheritance in DOP while there is inheritance in OOP.
There is no polymorphism in DOP while there is polymorphism is present in OOP
Good examples of DOP languages are Lisp, R, and Prolog, while OOP is in Java, CPP, Ruby, Python, Perl.
Source code in OOP can be:
class Student{
private:
string name;
public:
Student(){
}
Comments
Leave a comment