Mirrors: Design Principles for Meta-level Facilities of Object-Oriented Programming Languages

被引:3
作者
Bracha, Gilad [1 ]
Ungar, David [2 ]
机构
[1] Sun Microsyst, 4140 Network Circle, Santa Clara, CA 95054 USA
[2] Sun Microsyst, Mountain View, CA 94043 USA
关键词
Design; Languages; Reflection; Metaprogramming; Mirrors; !text type='Java']Java[!/text; Self; Smalltalk;
D O I
10.1145/2854695.2854699
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We identify three design principles for reflection and metaprogramming facilities in object oriented programming languages. Encapsulation: meta-level facilities must encapsulate their implementation. Stratification: meta-level facilities must be separated from base-level functionality. Ontological correspondence: the ontology of meta-level facilities should correspond to the ontology of the language they manipulate. Traditional/mainstream reflective architectures do not follow these precepts. In contrast, reflective APIs built around the concept of mirrors are characterized by adherence to these three principles. Consequently, mirror-based architectures have significant advantages with respect to distribution, deployment and general purpose metaprogramming.
引用
收藏
页码:35 / 48
页数:14
相关论文
共 33 条
[1]   TYPE INFERENCE OF SELF - ANALYSIS OF OBJECTS WITH DYNAMIC AND MULTIPLE INHERITANCE [J].
AGESEN, O ;
PALSBERG, J ;
SCHWARTZBACH, MI .
SOFTWARE-PRACTICE & EXPERIENCE, 1995, 25 (09) :975-995
[2]  
AGESEN O, 1997, P ACM C OBJ OR PROGR
[3]  
Agha GA, 1985, Technical report
[4]  
[Anonymous], 2000, Generative programming, DOI DOI 10.1126/science.1110411
[5]  
Bak Lars, 2002, ECOOP WORKSH INH JUN
[6]  
BRACHA G, 1990, P JOINT ACM C OBJ OR
[7]  
BRACHA G, 1993, P ACM C OBJ OR PROGR
[8]  
Bracha Gilad, 1996, OOPSLA WORKSH EXT SM
[9]  
Brandt Soren, 1986, PB505 AARH U DEP COM
[10]  
CHIBA S, 1998, P TECHN OBJ OR LANG