Evolving a reflective language: lessons learned from implementing traits

Abstract : Traits are method groups that can be used to compose classes. They do not have a runtime existence and are conceptually folded into the classes that use them. Traits have been implemented in different languages. While implementing them in Smalltalk, our first reflex was to take advantage of the fact that traits are not run-time entities: we optimized the implementation for space and hence shared methods between traits and classes. However, by doing so we broke the introspective API of Smalltalk. This paper illustrates a more general problem seen in all reflective systems: the implementation serves both as a model for execution and as the model that is exposed to the programmer. There is a conflict of interests between the information necessary for execution and the information the programmer is interested in. In addition, as soon as the implementation is exposed via reflection, we are not free to optimize. As the complete implementation is visible reflectively, there is no way to hide the optimizations. Few papers report errors and this is one of them. We report our experience facing the initial API mismatch, which has a significant impact on the system because the language is reflective (i.e., written in itself and causally connected). We present the new introspective API we put in place.
Type de document :
Communication dans un congrès
International Workshop on Smalltalk Technologies (IWST 2009), Aug 2009, Brest, France. pp.82-86, 2009, ACM digital library. 〈10.1145/1735935.1735949〉
Liste complète des métadonnées

Littérature citée [11 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/inria-00531048
Contributeur : Lse Lse <>
Soumis le : dimanche 16 janvier 2011 - 17:51:24
Dernière modification le : jeudi 11 janvier 2018 - 06:22:25
Document(s) archivé(s) le : samedi 3 décembre 2016 - 00:55:02

Fichier

Duca09bTraitsAPI.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

Citation

Stéphane Ducasse, Marcus Denker, Adrian Lienhard. Evolving a reflective language: lessons learned from implementing traits. International Workshop on Smalltalk Technologies (IWST 2009), Aug 2009, Brest, France. pp.82-86, 2009, ACM digital library. 〈10.1145/1735935.1735949〉. 〈inria-00531048v2〉

Partager

Métriques

Consultations de la notice

306

Téléchargements de fichiers

101