[1]周卫星,左正康*,王昌晶,等.泛型编程在面向对象语言中的对比研究[J].江西师范大学学报(自然科学版),2018,(03):304-310.[doi:10.16357/j.cnki.issn1000-5862.2018.03.14]
 ZHOU Weixing,ZUO Zhengkang*,WANG Changjing,et al.The Contrastive Study of Generic Programming in Object-Oriented Languages[J].Journal of Jiangxi Normal University:Natural Science Edition,2018,(03):304-310.[doi:10.16357/j.cnki.issn1000-5862.2018.03.14]
点击复制

泛型编程在面向对象语言中的对比研究()
分享到:

《江西师范大学学报》(自然科学版)[ISSN:1006-6977/CN:61-1281/TN]

卷:
期数:
2018年03期
页码:
304-310
栏目:
信息科学与技术
出版日期:
2018-06-20

文章信息/Info

Title:
The Contrastive Study of Generic Programming in Object-Oriented Languages
文章编号:
1000-5862(2018)03-0304-07
作者:
周卫星1左正康1*王昌晶1石海鹤1游 珍2谢武平2陶小明1
1.江西师范大学计算机信息工程学院,江西 南昌 330022; 2.江西师范大学江西省高性能计算重点实验室,江西 南昌 330022
Author(s):
ZHOU Weixing1ZUO Zhengkang1*WANG Changjing1SHI Haihe1YOU Zhen2XIE Wuping2TAO Xiaoming1
1.College of Computer Information Engineering,Jiangxi Normal University,Nanchang Jiangxi 330022,China; 2.Provincial Key Laboratory High Performance Computing,Jiangxi Normal University,Nanchang Jiangxi 330022,China
关键词:
泛型程序设计 类型约束 面向对象程序语言 泛型机制
Keywords:
generic programming type constraints object-oriented language generic mechanism
分类号:
TP 311
DOI:
10.16357/j.cnki.issn1000-5862.2018.03.14
文献标志码:
A
摘要:
泛型程序设计通过从更高的层次对具体的算法和数据结构进行抽象,提高了软件的可扩展性、复用性和类型安全性,它主要是基于一系列自定义的类型约束而不是仅局限于预定义类型.该文对C++、Concepts C++、Java、C#以及Python等5种不同的、支持泛型程序设计的面向对象程序设计语言进行综合比较,并执行一个典型的且能够较好支持泛型编程机制的例子来分析这些面向对象语言的特征及对泛型编程机制的支撑程度,从而探寻泛型编程的本质特性,为减少程序开发的冗余、增强程序的可维护性提供参考.
Abstract:
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.

参考文献/References:

[1] Chen Yewang,Jiang Zhixiong,Zhao Wenyun,et al.Generic component:a generic programming approach [EB/OL].
[2017-10-12].https://www.computer.org/csdl/proceedings/cit/2007/2983/00/29830087-abs.html.
[2] Yallop J.Staging generic programming [M].New York:ACM,2016:85-96.
[3] Järvi J,Lumsdaine A,Gregor D P,et al.Generic programming and high-performance libraries [J].International Journal of Parallel Programming,2005,33(2):145-164.
[4] Wirth N.Algorithms+data structures=programs [M].Englewood:Prentice Hall Press,1976.
[5] Garcia R,Jarvi J,Lumsdaine A,et al.An extended comparative study of language support for generic programming [J].Journal of Functional Programming,2007,17(2):145-205.
[6] Stepanov A,Meng L.The standard template library [J].C/C++ Users Journal,1999,13(12):10-20.
[7] Matthew H.Austern.Generic programming and the STL [M].Englewood:Addison-Wesley,2003.
[8] 孙斌.面向对象、泛型程序设计与类型约束检查 [J].计算机学报,2004,27(11):1492-1504.
[9] 陈林,徐宝文.基于源代码静态分析的C++0x泛型概念抽取 [J].计算机学报,2009:1973-1974.
[10] Érdi G.Generic description of well-scoped,well-typed syntaxes [EB/OL].
[2017-10-12].arXiv preprint arXiv:1804.00119.
[11] Magalhães J P,Löh A.Generic generic programming [M].Berlin:Springer International Publishing,2014:216-231.
[12] Musser D R.The tecton concept description language [EB/OL].
[2017-10-12].http://www.cs.rpi.edu/~musser/gp.
[13] Bachelet B,Mahul A,Yon L.Generic programming:controlling static specialization with Concepts in C++ [EB/OL].
[2017-10-12]. http://pdfs.semanticscholar.org/8486/ce9e2bb6d1061f55b6057b0d98aa8c654ada.pdf.
[14] Reis G D,Stroustrup B.Specifying C++ concepts [C]∥Conference Record of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages.ACM,2006:295-308.
[15] Dijkstra E W.Notes on structured programming [EB/OL].
[2017-10-12].http://www.cs.utexas.edu/~EWD/ewd02xx/EWD249.PDF.
[16] 陈叶旺,余金山.泛型编程与设计模式 [J].计算机科学,2006,33(4):254-255.
[17] Belyakova J.Language support for generic programming in object-oriented languages:peculiarities,drawbacks,ways of improvement [EB/OL].
[2017-10-12].http://www.springer.com/cda/content/document/cda_downloaddocument/9783319452784-t1.pdf?SGWID=0-0-45-1588893-p180207745.
[18] Bjarne Stroustrup,Gabriel Dos Reis.Concepts:design choices for template argument checking [EB/OL].
[2017-10-12].http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2003/n1522.pdf.
[19] Bjarne Stroustrup,Gabriel Dos Reis.Concepts:syntax and composition [EB/OL].
[2017-10-12].http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2003/n1536.pdf.
[20] Bjarne Stroustrup,Gabriel Dos Reis.A Concept Design(rev.1)[EB/OL].
[2017-10-12].http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1782.pdf.
[21] Stroustrup B,Reis G D.Supporting SELL for high-performance computing [C].Berlin:Heidelberg,2005:458-465.
[22] Gregor D,Siek J G,Willcock J,et al.Concepts for C++0x(Revision 1)[EB/OL].
[2017-10-19].http://www.www.stroustrup.com/SELL-HPC.pdf.
[23] Gregor D,Stroustrup B.Concepts(Revision 1)[EB/OL].
[2017-10-19].http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2006/n2081.pdf.
[24] 田方,石海鹤,左正康,等.一种抽象泛型机制的新型Java实现 [J].江西师范大学学报:自然科学版,2016,40(1):77-82.
[25] 吴国凤,方珏.基于Java语言中的泛型研究 [C]∥全国第19届计算机技术与应用(CACIS)学术会议论文集(下册),2008:1043-1047.
[26] Y Daniel Liang.Introduction to java programming [D].California:Armstrong Atlantic State University,2012.
[27] Belyakova J,Mikhalkovich S.Pitfalls of C# Generics and their solution using concepts [EB/OL].
[2017-10-19].http://www.ispras.ru/proceedings/docs/2015/27/3/isp_27_2015_3_29.pdf.
[28] Lämmel R,Jones S P.Scrap your boilerplate:a practical design pattern for generic programming [J].ACM SIGPLAN Notices,2003,38(3):26-37.
[29] 韩何,梁海华.产生式编程:方法、工具与应用 [M].北京:中国电力出版社,2004.
[30] 石海鹤,薛锦云.基于PAR的算法形式化开发 [J].计算机学报,2009,32(5):982-991.
[31] Xue Jinyun.Genericity in PAR platform [C]∥International Workshop on Structured Object-Oriented Formal Language and Method.Springer,Cham,2015:3-14.
[32] 左正康,薛锦云.Apla中泛型约束机制研究 [J].软件学报,2015,26(6):1340-1355.
[33] Ofenbeck G,Rompf T,Püschel M.Staging for generic programming in space and time [C]∥The ACM SIGPLAN International Conference.ACM,2017:15-28.

相似文献/References:

[1]左正康,刘志豪,黄 箐,等.Apla与程序设计语言泛型特性比较研究[J].江西师范大学学报(自然科学版),2019,(05):454.[doi:10.16357/j.cnki.issn1000-5862.2019.05.03]
 ZUO Zhengkang,LIU Zhihao,HUANG Qing,et al.The Comparative Study on the Generic Features of Apla and Programming Languages[J].Journal of Jiangxi Normal University:Natural Science Edition,2019,(03):454.[doi:10.16357/j.cnki.issn1000-5862.2019.05.03]

备注/Memo

备注/Memo:
收稿日期:2017-12-29
基金项目:国家自然科学基金(61462039,61762049,61662035,61462041),江西省自然科学基金(20171BAB202013,20171BAB202008)和江西省教育厅科技课题(GJJ150349,GJJ160329)资助项目.
通信作者:左正康(1980-),男,江西抚州人,副教授,博士,主要从事泛型程序设计和可信软件的研究.E-mail:kerrykaren@126.com
更新日期/Last Update: 2018-06-20