Just When You Thought Your Little Language Was Safe: "Expression Templates" in Java
Loading...
Can’t use the file because of accessibility barriers? Contact us
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Permanent Link
Abstract
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. 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.
Table of Contents
Description
Keywords
Citation
Journal
DOI
Link(s) to data and video for this item
Relation
Rights
This work is protected by copyright unless stated otherwise.