Difference between object oriented and object base

2019-02-01 23:41发布

What is the difference between an object oriented and an object based programming language? Is JavaScript is an object oriented or based?

3条回答
ゆ 、 Hurt°
2楼-- · 2019-02-01 23:45

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.

查看更多
贼婆χ
3楼-- · 2019-02-01 23:54

Wikipedia says:

In computer science, the term object-based has two different senses:

  • A somehow limited version of object-oriented programming, where one or more of the following restrictions applies: (a) There is no implicit inheritance, (b) there is no polymorphism, (c) only a very reduced subset of the available values are objects (typically the GUI components).

  • Prototype-based systems (that is, those based on "prototype" objects that are not instances of any class).

Javascript is object based.

查看更多
Lonely孤独者°
4楼-- · 2019-02-02 00:02

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.

查看更多
登录 后发表回答