面向对象VS基于对象的语言 [英] Object oriented VS Object based Language

查看:107
本文介绍了面向对象VS基于对象的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,


请指导我,我想在面向对象的语言基于对象的语言/
之间做出明显的区别
我在网上检查了一下,找到了一些信息,但是它们发生了冲突.

喜欢
Javascript是一种面向对象的程序设计,在另一个论坛上我发现它是用Java语言编写的.不知道哪一个是正确的..

以及语言是面向对象还是基于对象的背后原因是什么?或如何判断面向对象和基于对象的语言?

请指导我...我不想变得更加困惑.

谢谢

Hello friends,


Please guide me I want to make a clear difference between Object Oriented Languages and Object Based Languages/

I checked over the net where I found some information but they were clashing.

Like
Javascript is an Object Oriented Programming and in another forum I found it was written Javascript is an Object Based Programming. which one is correct no idea..

AND what''s the reason behind that a language is either Object oriented or Object Based. Or How can I judge which language is Object oriented and Object based?

Please guide me... I don''t want to get more confuse.

Thanks

推荐答案

首先,请阅读以下基础知识:
http://en.wikipedia.org/wiki/Object-based_language [http://en.wikipedia.org/wiki/面向对象的程序 [
在我的理解中,面向对象"是从动态调度动态绑定开始的,因此有可能进行后期绑定,请参见:
http://en.wikipedia.org/wiki/Dynamic_dispatch [ http://en.wikipedia.org/wiki/Late_binding [
这是OOP开始的地方. OOP最初没有引入下一个重要功能,即接口,因此,它并不是OOP绝对必需的.关于代表和事件,最后还有反思.所有这些功能都被认为是OOP不可或缺的一部分,但并非绝对必要.至于泛型,它们几乎是无关的.

—SA
First of all, read about the basics:
http://en.wikipedia.org/wiki/Object-based_language[^],
http://en.wikipedia.org/wiki/Object-oriented_programming[^].

You may find that the notion of "object-based" is not well-defined. This is true. This notion came with some languages which cannot be called truly object-oriented. This is something like Rubic Cube with all facets painted in the same green color. Not rotating. (One may ask: Why green, not some other color? For the military. :-)) One example is VB6.

In my understanding, "object-oriented" is started with the dynamic dispatch or dynamic binding and hence, a possibility for late binding, see:
http://en.wikipedia.org/wiki/Dynamic_dispatch[^],
http://en.wikipedia.org/wiki/Late_binding[^].

As to the requirement for inheritance (which is by some reason is called as a primary distinguished object-oriented feature in the the first referenced article), it comes with late binding automatically, because without inheritance nothing is "late". :-)

This is where OOP is started. Next important feature, interfaces, was not initially introduced in OOP, so it is not considered as absolutely required for OOP. Same thing about delegates and events and, finally, reflection. All these features are considered to be integral part of OOP, but not absolutely required. As to generics, they are pretty much unrelated.

—SA


这篇关于面向对象VS基于对象的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆