Flexible Object Layouts: enabling lightweight language extensions by intercepting slot access - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2011

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

Résumé

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.
Fichier principal
Vignette du fichier
Verw11b-OOSPLA11-FlexibleObjectLayouts.pdf (858.49 Ko) Télécharger le fichier
Origine : Fichiers éditeurs autorisés sur une archive ouverte
Loading...

Dates et versions

hal-00641716 , version 1 (16-11-2011)

Identifiants

  • HAL Id : hal-00641716 , version 1

Citer

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⟩
217 Consultations
328 Téléchargements

Partager

Gmail Facebook X LinkedIn More