Title
RPython: a step towards reconciling dynamically and statically typed OO languages
Abstract
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.
Year
DOI
Venue
2007
10.1145/1297081.1297091
DLS
Keywords
Field
DocType
reconciling dynamically,dynamic feature,jvm bytecode,final rpython,first-class method,bootstrapping phase,dynamic modification,oo language,general use,dynamic language,jvm platform,restricted python,python,object oriented language,net,exception handling
Programming language,Interoperability,Bootstrapping,Computer science,Exception handling,Robustness (computer science),Implementation,Interpreter,Bytecode,Python (programming language)
Conference
Citations 
PageRank 
References 
65
3.31
6
Authors
4
Name
Order
Citations
PageRank
Davide Ancona172769.43
Massimo Ancona216421.88
Antonio Cuni322911.58
Nicholas D. Matsakis4946.88