Bergel, Alexandre; Ducasse, Stéphane; Nierstrasz, Oscar; Wuyts, Roel (2005). Classboxes: Controlling Visibility of Class Extensions. Computer languages, systems & structures, 31(3-4), pp. 107-126. Elsevier 10.1016/j.cl.2004.11.002
Text
1-s2.0-S1477842405000035-main.pdf - Published Version Restricted to registered users only Available under License Publisher holds Copyright. Download (307kB) |
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.
Item Type: |
Journal Article (Original Article) |
---|---|
Division/Institute: |
08 Faculty of Science > Institute of Computer Science (INF) 08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG) [discontinued] |
UniBE Contributor: |
Ducasse, Stephane, Nierstrasz, Oscar |
Subjects: |
000 Computer science, knowledge & systems 500 Science > 510 Mathematics |
ISSN: |
1477-8424 |
Publisher: |
Elsevier |
Language: |
English |
Submitter: |
Anja Ebeling |
Date Deposited: |
18 Oct 2017 12:10 |
Last Modified: |
11 Apr 2024 16:11 |
Publisher DOI: |
10.1016/j.cl.2004.11.002 |
BORIS DOI: |
10.7892/boris.104385 |
URI: |
https://boris.unibe.ch/id/eprint/104385 |