详细信息
文献类型:期刊文献
中文题名:泛型程序的多型值构造
英文题名:Constructing Polytypic Values in Generic Programs
作者:丁志义[1];宋国新[1];邵志清[1]
机构:[1]华东理工大学计算机科学与工程系
年份:2006
卷号:32
期号:8
起止页码:967
中文期刊名:华东理工大学学报(自然科学版)
外文期刊名:Journal of East China University of Science and Technology
收录:CSTPCD;;EI(收录号:20064110166034);Scopus;北大核心:【北大核心2004】;CSCD:【CSCD2011_2012】;
基金:国家自然科学基金(60373075;60473055)
语种:中文
中文关键词:泛型程序设计;类型;函数式语言
外文关键词:generic programming; type; functional programming language
摘要:泛型程序设计提供了一种重要的程序设计范型,使程序员无须为不同的数据类型重复编写功能相似的程序代码。本文以相等函数为例阐述了泛型程序设计的基本方法,并利用直积和直和给出了构造多型值的方法。利用这一结果能够定义各种数据类型的相等性,同时,定义相等性的方法也可以自然地推广到其他函数的定义上。
As an important programming paradigm, generic programming relieves the programmer from repeatedly writing codes of similar functionality for different data types. In functional programming, equality function is a very common operator for comparing two values of the same data type, we use this concrete example to explain the basic method of constrcuting generic programs and polytypic values. The methods are capable of defining equality on every data type. Moreover, this way of defining equality can be generalized naturally to a large number of other functions.
参考文献:
正在载入数据...
