首页> 外文会议>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 complexities such as 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设计局部评估程序,我们在不扩展Java语言的情况下,再现了C ++模板的某些生成编程方面。名为Lunar的原型编译器能够在Java中执行“表达式模板”,以优化数值数组对象。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号