Skip to Main content Skip to Navigation
Conference papers

Flexible Object Layouts: enabling lightweight language extensions by intercepting slot access

Abstract : Programming idioms, design patterns and application li- braries often introduce cumbersome and repetitive boiler- plate code to a software system. Language extensions and external DSLs (domain specific languages) are sometimes introduced to reduce the need for boilerplate code, but they also complicate the system by introducing the need for lan- guage dialects and inter-language mediation. To address this, we propose to extend the structural reflec- tive model of the language with object layouts, layout scopes and slots. Based on the new reflective language model we can 1) provide behavioral hooks to object layouts that are triggered when the fields of an object are accessed and 2) simplify the implementation of state-related language exten- sions such as stateful traits. By doing this we show how many idiomatic use cases that normally require boilerplate code can be more effectively supported. We present an implementation in Smalltalk, and illustrate its usage through a series of extended examples.
Document type :
Conference papers
Complete list of metadata

Cited literature [22 references]  Display  Hide  Download
Contributor : Lse Lse <>
Submitted on : Wednesday, November 16, 2011 - 2:51:05 PM
Last modification on : Thursday, February 21, 2019 - 10:52:50 AM
Long-term archiving on: : Monday, December 5, 2016 - 10:15:38 AM


Publisher files allowed on an open archive


  • HAL Id : hal-00641716, version 1



Toon Verwaest, Camillo Bruni, Mircea Lungu, Oscar Nierstrasz. Flexible Object Layouts: enabling lightweight language extensions by intercepting slot access. Proceedings of 26th International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '11), Nov 2011, Portland, United States. ⟨hal-00641716⟩



Record views


Files downloads