简体   繁体   English

编程语言中的继承起源

[英]Origin of inheritance in programming languages

What was the first language to support inheritance? 支持继承的第一种语言是什么? Was code re-use the design intent of the feature? 代码是否重用了功能的设计意图?

The first object oriented language was Simula . 第一种面向对象的语言是Simula Specifically Simula67, introduced in 1967 and implemented in 1968. Simula67 added the concept of classes and subclasses (inheritance) inspired by a research paper (theory, not any specific language) by CAR Hoare describing the concept of classes as a collection of data in memory published in 1966. 特别是Simula67,于1967年引入并于1968年实施。Simula67添加了类和子类(继承)的概念,该概念受CAR Hoare的研究论文(理论,而不是任何特定语言)的启发,将类的概念描述为内存中数据的集合1966年出版。

So the first oo language was Simula67 and inheritance was introduced in Simula67. 因此,第一种oo语言是Simula67,并且在Simula67中引入了继承。 It was there from the beginning. 从一开始就在那里。

Now, the real interesting question would be what was the first oo language to abandon inheritance. 现在,真正有趣的问题是什么是第一种放弃继承的oo语言。 Go is one oo language that intentionally left out inheritance. Go是一种有意遗漏继承的oo语言。 But that is a very modern example. 但这是一个非常现代的例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM