Classboxes: Controlling Visibility of Class Extensions

Abstract : A class extension is a method that is defined in a module, but whose class is defined elsewhere. Class extensions offer a convenient way to incrementally modify existing classes when subclassing is inappropriate. Unfortunately existing approaches suffer from various limitations. Either class extensions have a global impact, with possibly negative effects for unexpected clients, or they have a purely local impact, with negative results for collaborating clients. Furthermore, conflicting class extensions are either disallowed, or resolved by linearization, with consequent negative effects. To solve these problems we present classboxes, a module system for object-oriented languages that provides for method addition and replacement. Moreover, the changes made by a classbox are only visible to that classbox (or classboxes that import it), a feature we call local rebinding. To validate the model we have implemented it in the Squeak Smalltalk environment, and performed benchmarks.
Document type :
Journal articles
Complete list of metadatas

Cited literature [19 references]  Display  Hide  Download

https://hal.inria.fr/inria-00533458
Contributor : Lse Lse <>
Submitted on : Friday, January 14, 2011 - 4:10:57 PM
Last modification on : Friday, January 14, 2011 - 5:04:56 PM
Long-term archiving on : Tuesday, November 6, 2012 - 11:31:27 AM

File

Berg05a-CompLangESUG04-classbo...
Files produced by the author(s)

Identifiers

  • HAL Id : inria-00533458, version 1

Citation

Alexandre Bergel, Stéphane Ducasse, Oscar Nierstrasz, Roel Wuyts. Classboxes: Controlling Visibility of Class Extensions. Computer Languages, Systems and Structures, Elsevier, 2005. ⟨inria-00533458⟩

Share

Metrics

Record views

178

Files downloads

296