What is the difference between an object oriented and an object based programming language? Is JavaScript is an object oriented or based?
相关问题
- Is there a limit to how many levels you can nest i
- how to define constructor for Python's new Nam
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
Object Oriented is based on message passing, no classes or inheritance involved.
"Object oriented" coined by Dr Alan Kay has been hijacked by C++, Java and Co, Dr Alan Kay made it clear that OO was messages, not classes. Dr Alan Kay On OO "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things."
Erlang, LISP, Smalltalk are OO programming languages, not C++, Java, c# etc which are in effect object based.
Wikipedia says:
Javascript is object based.
Object-oriented language
Object-oriented language doesn't has in-built object. It has all feature of OOP. Object-oriented languages are C++, C#, Java etc
Object-based language
Object-based language doesn't support all the features of OOPs like Polymorphism and Inheritance. It has in-built object like javascript has window object.languages are Javascript, VB etc.