Implementing dynamic language features in Java using dynamic code generation

Compared to dynamic object-oriented languages like CommonLisp or Smalltalk, Java has a fairly simple and restrictive object and type system. Some of the key differences between Java and these other languages are that they offer structural conformance, automatic delegation and dynamic mix-ins. When s...

Full description

Saved in:
Bibliographic Details
Published inProceedings 39th International Conference and Exhibition on Technology of Object-Oriented Languages and Systems. TOOLS 39 pp. 143 - 152
Main Author Breuel, T.M.
Format Conference Proceeding
LanguageEnglish
Published IEEE 2001
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:Compared to dynamic object-oriented languages like CommonLisp or Smalltalk, Java has a fairly simple and restrictive object and type system. Some of the key differences between Java and these other languages are that they offer structural conformance, automatic delegation and dynamic mix-ins. When such constructs are needed in a language like Java, they are usually expressed in terms of standard object-oriented design patterns, requiring the manual implementation of "glue" or "helper" classes. This paper describes ways in which such features can be provided efficiently and automatically in terms of Java's platform-independent binary format and dynamic loading mechanisms. The implementation does not require any changes to the Java runtime environment, byte-codes or class loader, and it yields a performance that is comparable to manually implemented design patterns. The approach should prove useful both as a programming tool for Java and as a strategy for building efficient implementations of dynamic languages on top of the Java Virtual Machine.
ISBN:0769512518
9780769512518
ISSN:1530-2067
2331-3277
DOI:10.1109/TOOLS.2001.941668