网站首页  英汉词典

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

 

单词 Parametric polymorphism
释义

Parametric polymorphism

中文百科

参数多态

参数多态在进程设计语言与类型论中是指声明与定义函数、复合类型、变量时不指定其具体的类型,而把这部分类型作为参数使用,使得该定义对各种具体类型都适用。参数化多态使得语言更具表达力,同时保持了完全的静态类型安全。 这被称为泛型函数、泛型数据类型、泛型变量,形成了泛型编程的基础。

参数多态名字来源于其发明人克里斯托弗·斯特雷奇,与特设多态(ad hoc polymorphism)相对。特设多态是指一个多态函数有多个不同的实现,依赖于其实参而调用相应版本的函数。因此,特设多态仅支持有限数量的不同类型。

英语百科

Parametric polymorphism 参数多态

In programming languages and type theory, parametric polymorphism is a way to make a language more expressive, while still maintaining full static type-safety. Using parametric polymorphism, a function or a data type can be written generically so that it can handle values identically without depending on their type. Such functions and data types are called generic functions and generic datatypes respectively and form the basis of generic programming.

随便看

 

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

 

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