摘要
泛型程序设计通过从更高的层次对具体的算法和数据结构进行抽象,提高了软件的可扩展性、复用性和类型安全性,它主要是基于一系列自定义的类型约束而不是仅局限于预定义类型.该文对C++、Concepts C++、Java、C#以及Python等5种不同的、支持泛型程序设计的面向对象程序设计语言进行综合比较,并执行一个典型的且能够较好支持泛型编程机制的例子来分析这些面向对象语言的特征及对泛型编程机制的支撑程度,从而探寻泛型编程的本质特性,为减少程序开发的冗余、增强程序的可维护性提供参考.
Generic programming improves the scalability,reusability,and type safety of software by abstracting the concrete algorithms and data structures from a higher level. It is mainly based on a series of custom type constraints rather than just predefined type. Five different object-oriented programming languages are compared comprehensively in this article that support generic programming such as C + +,Concepts C + +,Java,C#,and Python,and perform a typical example that can better support generic programming mechanisms to analysis the characteristics of these object-oriented languages and the degree of support,so that can explore the nature features of generic programming,and provide references for reducing the development of redundant programs and enhancing the maintainability of the program.
作者
周卫星
左正康
王昌晶
石海鹤
游珍
谢武平
陶小明
ZHOU Weixing;ZU;WANG Changing;SHI Haihe;YOU Zhen;XIE Wuping;TA(College of Computer Information Engineering,Jiangxi Normal University ,Nanchang Jiangxi 330022,China;Provincial Key Laboratory High Performance Computing,Jiangxi Normal University,Nanchang Jiangxi 330022,China)
出处
《江西师范大学学报(自然科学版)》
CAS
北大核心
2018年第3期304-310,共7页
Journal of Jiangxi Normal University(Natural Science Edition)
基金
国家自然科学基金(61462039,61762049,61662035,61462041)
江西省自然科学基金(20171BAB202013,20171BAB202008)
江西省教育厅科技课题(GJJ150349,GJJ160329)资助项目