Hierarchical Layer-Based Class Extensions in Squeak/Smalltalk
被引:0
|
作者:
Springer, Matthias
论文数: 0引用数: 0
h-index: 0
机构:
Tokyo Inst Technol, Dept Math & Comp Sci, Tokyo, JapanTokyo Inst Technol, Dept Math & Comp Sci, Tokyo, Japan
Springer, Matthias
[1
]
论文数: 引用数:
h-index:
机构:
Masuhara, Hidehiko
[1
]
Hirschfeld, Robert
论文数: 0引用数: 0
h-index: 0
机构:
Univ Potsdam, Hasso Plattner Inst, Potsdam, Germany
SAP Labs, CDG, Palo Alto, CA USA
Viewpoints Res Inst, Glendale, CA USATokyo Inst Technol, Dept Math & Comp Sci, Tokyo, Japan
Hirschfeld, Robert
[2
,3
,4
]
机构:
[1] Tokyo Inst Technol, Dept Math & Comp Sci, Tokyo, Japan
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.