期刊文献+

基于Haskell语言的泛型扩展研究 被引量:2

Generic Extension Research Based on Haskell Language
下载PDF
导出
摘要 泛型即通过参数化类型来实现在同一份代码上操作多种数据类型。泛型编程是一种编程范式,它利用"参数化类型"将类型抽象化,实现灵活的软件复用。泛型编程思想已经在多种语言中得到运用,并已取得了不小的成果。文中旨在Haskell语言上进行泛型的研究与应用,Haskell语言是一门广为流行的函数式语言,它的计算模型简单,程序语法清晰,易于编写,易于维护。文中利用一些规则对Haskell语言的语法进行扩展,同时引入泛型编程的思想来研究新的函数定义方法,最后在Haskell语言上实现泛型功能。 Generic can treat the types as arguments. Then many kinds of data-types can be processed by the same source code. Generic programming is a normal form of programming. It can make types abstract by a method called type parameterization. So realize the goal of software reuse agilely. For the moment, the idea of generic programming has been realized in many languages, which have got great achievement. It is intended to make some research in the field of Haskell language, and give an application as an example. Haskell is a popular language,and it is functional too. It has a lot of advantages, such as simple module, clarity syntax, etc. So the programmer can write and modify Haskell sentence easily. It shows the extension of the grammar of Haskell according to some rules, which also introduces the idea of generic programming, and gives some methods to define functions. Finally, the function of generic would be completed in Haskell.
出处 《计算机技术与发展》 2012年第6期89-92,96,共5页 Computer Technology and Development
关键词 泛型编程 类型抽象 函数式程序语言 语法扩展 generic programming type abstract functional programming language grammar extension
  • 相关文献

参考文献18

  • 1Jones S P, Shields M. Practical type inference for arbitrary- rank types[ R]. Microsoft Research ,2003. 被引量:1
  • 2陈叶旺,余金山.泛型编程与设计模式[J].计算机科学,2006,33(4):253-257. 被引量:8
  • 3吴拥民.泛型设计的理论研究[J].闽江学院学报,2006,27(2):72-76. 被引量:4
  • 4Ltih A. Exploring Generic Haskell [ D ]. Netherlands : Utrecht University ,2004. 被引量:1
  • 5Pierce B C. Types and Programming Languages [ R ]. [ s. 1. ] : The MIT Press,2002. 被引量:1
  • 6Loh A, Clarke D, Jeuring J. Dependency- style Generic HaskeU[ C ]//Proceedings of the eighth ACM SIGPLAN inter- national conference on functional programming. [ s. 1. ] : ACM Press,2003 : 141 - 152. 被引量:1
  • 7Jay B. The pattern calculus [ J ]. ACM Transactions on Pro- gramming Languages and Systems,2004,26 (6) :911-937. 被引量:1
  • 8孙斌.面向对象、泛型程序设计与类型约束检查[J].计算机学报,2004,27(11):1492-1504. 被引量:14
  • 9Wadler P, Blott S. How to make ad-hoc polymorphism less ad -hoc[C]//Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. [ s. 1. ] : ACM Press, 1989:60-76. 被引量:1
  • 10Pitts A. Parametric polymorphism and operational equivalence [ J ]. Mathematical Structu~s in Computer Science, 2000 (10) :231-259. 被引量:1

二级参考文献72

共引文献22

同被引文献9

引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部