Evolving a Reflective Language. Lessons Learned from Implementing Traits

Ducasse, Stéphane; Denker, Marcus; Lienhard, Adrian (2009). Evolving a Reflective Language. Lessons Learned from Implementing Traits. In: IWST '09 Proceedings of the International Workshop on Smalltalk Technologies (p. 82). New York, NY, USA: ACM 10.1145/1735935.1735949

[img] Text
p82-ducasse.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (189kB) | Request a copy

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.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)

UniBE Contributor:

Denker, Marcus and Lienhard, Adrian

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

ISBN:

978-1-60558-899-5

Publisher:

ACM

Language:

English

Submitter:

Manuela Bamert

Date Deposited:

30 Aug 2017 10:31

Last Modified:

13 Sep 2017 08:18

Publisher DOI:

10.1145/1735935.1735949

BORIS DOI:

10.7892/boris.104514

URI:

https://boris.unibe.ch/id/eprint/104514

Actions (login required)

Edit item Edit item
Provide Feedback