Title
Flexible object layouts: enabling lightweight language extensions by intercepting slot access
Abstract
Programming idioms, design patterns and application libraries often introduce cumbersome and repetitive boilerplate 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 language dialects and inter-language mediation. To address this, we propose to extend the structural reflective 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 extensions 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.
Year
DOI
Venue
2011
10.1145/2048066.2048138
OOPSLA
Keywords
Field
DocType
software system,repetitive boilerplate code,intercepting slot access,state-related language extension,new reflective language model,flexible object layout,lightweight language extension,language extension,language dialect,boilerplate code,domain specific language,object layout,structural reflective model,use case,design pattern,software systems,language model
Object code,Domain-specific language,Common Intermediate Language,Programming language,Computer science,Boilerplate code,Smalltalk,Object language,Theoretical computer science,Low-level programming language,Programming language implementation
Conference
Volume
Issue
ISSN
46
10
0362-1340
Citations 
PageRank 
References 
10
0.75
16
Authors
4
Name
Order
Citations
PageRank
Toon Verwaest1292.99
Camillo Bruni2141.82
Mircea Lungu354539.17
Oscar Nierstrasz42404346.86