...
首页> 外文期刊>Journal of Functional Programming >Functional programming with the FC++ library
【24h】

Functional programming with the FC++ library

机译:使用FC ++库进行功能编程

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

We describe the FC++ library, a rich library supporting functional programming in C++. Prior approaches to encoding higher order functions in C++ have suffered with respect to polymorphic functions from either lack of expressiveness or high complexity. In contrast, FC++ offers full and concise support for higher-order polymorphic functions through a novel use of C++ type inference. The FC++ library has a number of useful features, including a generalized mechanism to implement currying in C++, a "lazy list" class which enables the creation of "infinite data structures", a subtype polymorphism facility, and an extensive library of useful functions, including a large part of the Haskell Standard Prelude. The FC++ library has an efficient implementation. We show the results of a number of experiments which demonstrate the value of optimizations we have implemented. These optimizations have improved the run-time performance by about an order of magnitude for some benchmark programs that make heavy use of FC++ lazy lists. We also make an informal performance comparison with similar programs written in Haskell.
机译:我们描述FC ++库,它是一个丰富的库,支持C ++中的功能编程。相对于多态函数,以前的C ++编码高阶函数的方法由于缺乏表达能力或复杂性而受到困扰。相反,FC ++通过新颖使用C ++类型推断,为高阶多态函数提供了完整而简洁的支持。 FC ++库具有许多有用的功能,包括在C ++中实现currying的通用机制,可以创建“无限数据结构”的“惰性列表”类,子类型多态性工具以及广泛的有用函数库,包括Haskell标准序曲的很大一部分。 FC ++库具有高效的实现。我们展示了许多实验的结果,这些实验证明了我们实施的优化的价值。对于一些大量使用FC ++惰性列表的基准测试程序,这些优化使运行时性能提高了大约一个数量级。我们还与Haskell编写的类似程序进行了非正式的性能比较。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号