Controlling Visibility of Class Extensions. Classboxes

Controlling Visibility of Class Extensions. Classboxes

Alexandre Bergel

     

бумажная книга



Издательство: Книга по требованию
Дата выхода: июль 2011
ISBN: 978-3-6391-6518-0
Объём: 156 страниц
Масса: 258 г
Размеры(В x Ш x Т), см: 23 x 16 x 1

Unanticipated changes to complex software systems can introduce anomalies such as duplicated code, suboptimal inheritance relationships and a proliferation of run-time downcasts. Refactoring to eliminate these anomalies may not be an option, at least in certain stages of software evolution. 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 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 subsequent negative effects. To solve these problems we present classboxes, a module system for object-oriented languages that provides for behavior refinement (i.e., 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.

Данное издание не является оригинальным. Книга печатается по технологии принт-он-деманд после получения заказа.

Каталог