Interfaces的概念来自哪里? [英] Where did the concept of Interfaces come from?

查看:94
本文介绍了Interfaces的概念来自哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在c#中,我们有接口。这些来自哪里?它们在c ++中不存在。

In c#, we have interfaces. Where did these come from? They didn't exist in c++.

推荐答案

接口很老了,已经存在了很长一段时间。

Interfaces are pretty old, and have been around for quite a while.

早期(1970年代中后期)非面向对象语言(如Modula和Euclid)使用称为模块的构造来指定组件之间的接口。然后,组件将通过显式导入和导出模块相互通信。 C#中的接口是同一概念的面向对象的演进。

Early (mid to late late 1970's) non-object oriented languages such as Modula and Euclid used constructs called "modules" to specify the interfaces between components. Components would then communicate with each other via explicit importing and exporting modules. Interfaces in C# are object oriented evolutions of that same concept.

C#中的接口直接从C ++(和Java)中的接口概念扩展而来,它们被用作COM的一部分,用于描述面向对象的组件接口。

Interfaces in C# directly extend from the concept of interfaces in C++ (and Java), where they were used as part of COM for describing object-oriented component interfaces.

编辑:在进行少量研究时,我能用明确的界面关键字找到的最早的语言是Modula-3,一个派生词Modula创建于1986年左右。

In doing a small amount of research, the earliest language I could find with an explicit "interface" keyword was Modula-3, a derivitive of Modula created around 1986.

这篇关于Interfaces的概念来自哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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