V2EX  ›  英汉词典

Generic Programming

释义 Definition

泛型编程:一种编程范式,通过把“类型”作为参数来编写可复用、与具体数据类型无关的算法与数据结构;常见于 C++ 模板Java/C# 泛型 等。它强调用统一的接口与约束,让同一套代码适用于多种类型。(在某些语境下也可泛指“参数化/类型抽象”的编程方法。)

发音 Pronunciation (IPA)

/dʒəˈnɛrɪk ˈproʊɡræmɪŋ/

例句 Examples

Generic programming lets you write one function that works for many types.
泛型编程让你编写一个函数,就能适用于多种类型。

By using generic programming with well-defined constraints, the library offers reusable algorithms that remain efficient across different data structures.
通过在泛型编程中加入清晰的约束,这个库提供了可复用的算法,并且在不同数据结构上仍能保持高效。

词源 Etymology

generic 源自拉丁语 genus(“种类、类别”),表示“通用的、非特定的”;programming 来自 “program”(程序)+ “-ing”。合起来的含义就是“面向多种类别(类型)的编程”。该术语在计算机科学中与 C++ 模板与 STL 的发展密切相关,并在亚历山大·斯捷潘诺夫(Alexander Stepanov)等人的工作中被系统化。

相关词 Related Words

文学与著作中的使用 Literary Works

  • Generic Programming and the STL: Using and Extending the C++ Standard Template Library(Matthew H. Austern)
  • Elements of Programming(Alexander Stepanov, Paul McJones)
  • The C++ Programming Language(Bjarne Stroustrup)
  • *The Design and Evolution of C++*(Bjarne Stroustrup)
  • 论文:Generic Programming(Alexander Stepanov, David R. Musser 等相关论文与报告中常见该术语)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   714 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 19:24 · PVG 03:24 · LAX 11:24 · JFK 14:24
♥ Do have faith in what you're doing.