|
[ Publications ]
[ Research Opportunities ]
[ Partners & Supporters ]
[ Earlier Work ]
|
|
RPython: a Step Towards Reconciling Dynamically and Statically Typed OO Languages
|
| Davide Ancona,
Massimo Ancona,
Antonio Cuni,
Nicholas Matsakis,
RPython: a Step Towards Reconciling Dynamically and Statically Typed OO Languages, OOPSLA -- Dynamic Language Symposium, July 2007.
[DLS_2007.pdf]
|
|
Although the C-based interpreter of Python is reasonably fast,
implementations on the CLI or the JVM platforms offers some
advantages in terms of robustness and interoperability.
Unfortunately, because the
CLI and JVM are primarily designed
to execute statically typed, object-oriented languages, most dynamic language
implementations cannot use the native bytecodes for common operations like
method calls and exception handling; as a result, they are not able to take full
advantage of the power offered by the CLI and JVM.
We describe a different approach that attempts to preserve
the flexibility of Python, while still allowing for efficient execution.
This is achieved by limiting the use of the more dynamic features of
Python to an initial, bootstrapping phase. This phase is used to construct
a final RPython (Restricted Python) program that is actually executed.
RPython is a proper subset of Python, is statically typed, and does
not allow dynamic modification of class or method definitions;
however, it can still take advantage
of Python features such as mixins and first-class methods and classes.
This paper presents an overview of RPython, including its design and
its translation to both CLI and JVM bytecode. We show how the
bootstrapping phase can be used to implement advanced features,
like extensible classes and generative programming.
We also discuss what work remains before RPython is truly ready for general use,
and compare the performance of RPython with that of other approaches.
|
|
[ Publications ]
[ Research Opportunities ]
[ Partners & Supporters ]
[ Earlier Work ]
|
|