V2EX  ›  英汉词典

Supertype

释义 Definition

(名词)“超类型/父类型/上位类型”:在类型系统(尤其是面向对象与泛型)中,指比另一个类型更一般、更抽象的类型;后者称为 subtype(子类型)。常见于“继承”“接口”“类型层级”等语境。(在生物分类学中也可指“超类群/上位分类单元”,但更常见于计算机领域。)

发音 Pronunciation

/ˈsuːpərˌtaɪp/

例句 Examples

A vehicle is a supertype of car.
“Vehicle(交通工具)”是“car(汽车)”的超类型。

In this API design, we accept the supertype to allow different implementations without changing the function signature.
在这个 API 设计中,我们接收超类型,以便在不改变函数签名的情况下兼容不同实现。

词源 Etymology

由 **super-**(“在……之上、超越、更高层级”)+ type(“类型”)构成,字面意思是“更上层的类型”。在计算机科学的类型论与面向对象语境中,用来表达“更通用的类型”与“类型层级关系”。

相关词 Related Words

文学作品 Literary Works

  • Robert C. Martin — Clean Code(在讨论面向对象设计与抽象层级时常涉及“父类/更一般的类型”这一概念,语义上对应 supertype
  • Martin Fowler — Refactoring(涉及类型抽象、继承与接口等内容,常出现与 supertype/subtype 关系相近的表述)
  • Joshua Bloch — Effective Java(在泛型与类型边界等章节中讨论类型层级与更一般类型的用法,与 supertype 概念密切相关)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2369 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 13:53 · PVG 21:53 · LAX 05:53 · JFK 08:53
♥ Do have faith in what you're doing.