OOP vs POP
#pop #protocolorientedprogramming #oop #objectorientedprogramming
Last updated
Was this helpful?
#pop #protocolorientedprogramming #oop #objectorientedprogramming
Last updated
Was this helpful?
The main difference between OOP & POP is inheritance.
POP focuses on what an object can do, while OOP focuses on what an object is ().
Value Type: struct, enum
Reference Type: Class
Inheritance from one SuperClass.
It focuses on what an object is ().
Inheritance from other Protocols and even from multiple Protocols.
Allows smaller and specıfıc protocols.
They have suffixes like "-able"
Code clarity
Reusability
Separation of classes
Too granular protocols will be hard to manage.
Structs are unique copies. They copy the data over and over again
It focuses on what an object can do ().