首页> 外文会议>Symposium on Generative and Component-Based Software Engineering >Just When You Thought Your Little Language Was Safe: 'Expression Templates' in Java
【24h】

Just When You Thought Your Little Language Was Safe: 'Expression Templates' in Java

机译:就在你认为你的小语言是安全的:Java中的“表达模板”

获取原文

摘要

Template techniques in C++ allow a modest degree of generative programming: creating specialized code for specialized problems. This use of templates has been controversial; indeed, one of the oft-cited reasons for migrating to Java is that it provides a simpler language, free of the complexities of templates. The essence of generative programming in C++ is not templates - the language feature - but rather the underlying algorithms in the compiler (template instantiation) which unintentionally resemble an optimization called partial evaluation [14,20]. By devising a partial evaluator for Java, we reproduce some of the generative programming aspects of C++ templates, without extending the Java language. The prototype compiler, called Lunar, is capable of doing "expression templates" in Java to optimize numerical array objects.
机译:C ++中的模板技术允许适度的生成规划:为专门问题创建专用代码。这种模板的使用已经存在争议;实际上,迁移到Java的字段引用原因之一是它提供了一种更简单的语言,没有模板的复杂性。 C ++中生成规划的本质不是模板 - 语言特征 - 而是编译器中的基础算法(模板实例化),它无意中类似于称为部分评估的优化[14,20]。通过设计用于Java的部分评估器,我们重现了C ++模板的一些生成编程方面,而无需扩展Java语言。称为Lunar的原型编译器能够在Java中执行“表达式模板”以优化数字数组对象。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号