Hierarchical Layer-Based Class Extensions in Squeak/Smalltalk

被引:0
|
作者
Springer, Matthias [1 ]
Masuhara, Hidehiko [1 ]
Hirschfeld, Robert [2 ,3 ,4 ]
机构
[1] Tokyo Inst Technol, Dept Math & Comp Sci, Tokyo, Japan
[2] Univ Potsdam, Hasso Plattner Inst, Potsdam, Germany
[3] SAP Labs, CDG, Palo Alto, CA USA
[4] Viewpoints Res Inst, Glendale, CA USA
来源
COMPANION PROCEEDINGS OF THE 15TH INTERNATIONAL CONFERENCE ON MODULARITY (MODULARITY COMPANION'16) | 2016年
关键词
Class extension; context-oriented programming; mixins;
D O I
10.1145/2892664.2892682
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Class extensions are frequently used in programming languages such as Ruby and Smalltalk to add or change methods of a class that is defined in the same application or in a different one. They suffer from modularity issues if globally visible: Other applications using the same classes are then affected by the modifications. This paper presents a hierarchical approach for dynamically scoping class extensions in dynamically-typed, class-based programming languages supporting class nesting. Our mechanism allows programmers to define the scope of class extensions and to reuse class extensions in other programs. Class extensions can be scoped according to a nested class hierarchy or based on whether programmers regard a potentially affected class as a black box or not. Class extensions are organized in layers, where multiple layers targeting the same class can be active at the same time.
引用
收藏
页码:107 / 112
页数:6
相关论文
empty
未找到相关数据