...
首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Algorithm specialization in generic programming: challenges of constrained generics in C++
【24h】

Algorithm specialization in generic programming: challenges of constrained generics in C++

机译:泛型编程中的算法专业化:C ++中受约束的泛型的挑战

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

摘要

Generic programming has recently emerged as a paradigm for developing highly reusable software libraries, most notably in C++. We have designed and implemented a constrained generics extension for C++ to support modular type checking of generic algorithms and to address other issues associated with unconstrained generics. To be as broadly applicable as possible, generic algorithms are defined with minimal requirements on their inputs. At the same time, to achieve a high degree of efficiency, generic algorithms may have multiple implementations that exploit features of specific classes of inputs. This process of algorithm specialization relies on non-local type information and conflicts directly with the local nature of modular type checking. In this paper, we review the design and implementation of our extensions for generic programming in C++, describe the issues of algorithm specialization and modular type checking in detail, and discuss the important design tradeoffs in trying to accomplish both.We present the particular design that we chose for our implementation, with the goal of hitting the sweet spot in this interesting design space.
机译:泛型编程最近已成为开发高度可重用的软件库(尤其是在C ++中)的范例。我们已经为C ++设计并实现了受约束的泛型扩展,以支持泛型算法的模块化类型检查并解决与不受约束的泛型相关的其他问题。为了尽可能广泛地应用,定义了通用算法,并且对它们的输入没有什么要求。同时,为了实现高效率,通用算法可能具有多种利用特定输入类别的功能的实现。该算法专业化过程依赖于非本地类型信息,并且与模块化类型检查的本地性质直接冲突。在本文中,我们回顾了C ++中通用编程的扩展的设计和实现,详细描述了算法专业化和模块化类型检查的问题,并讨论了在尝试实现两者时的重要设计折衷方案。我们选择实施,目的是在这个有趣的设计空间中达到最佳效果。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号