网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Ad hoc polymorphism
释义

Ad hoc polymorphism

中文百科

特设多态

特定多态ad hoc polymorphism)是进程设计语言的一种多态,多态函数有多个不同的实现,依赖于其实参而调用相应版本的函数。因此,特设多态仅支持有限数量的不同类型。也称作函数重载或运算符重载。

特定多态的名字来源于其发明人克里斯托弗·斯特雷奇于1967年8月在哥本哈根的计算机进程设计暑期学校发表了著名论文Fundamental Concepts in Programming Languages中首次提出了参数多态、特设多态、左值、右值等概念。。特设多态与参数多态相对。ad hoc在这里并不是贬义,而是指这类多态并不是类型系统的基本特性,不是像参数多态那样适用于无穷多的类型,而是针对特定问题的解决方案。参数多态对各模板参数的实现,是根据模板的通用(generically)的行为的抽象,即泛型的语义;而特设多态可以针对不同的版本实现完全不同的行为。

英语百科

Ad hoc polymorphism 特设多态

In programming languages, ad hoc polymorphism is a kind of polymorphism in which polymorphic functions can be applied to arguments of different types, because a polymorphic function can denote a number of distinct and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied. It is also known as function overloading or operator overloading. The term ad hoc in this context is not intended to be pejorative; it refers simply to the fact that this type of polymorphism is not a fundamental feature of the type system. This is in contrast to parametric polymorphism, in which polymorphic functions are written without mention of any specific type, and can thus apply a single abstract implementation to any number of types in a transparent way. This classification was introduced by Christopher Strachey in 1967.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/19 23:48:21