A COMPARISON OF OBJECT-ORIENTED PROGRAMMING IN 4 MODEM LANGUAGES

被引:8
|
作者
HENDERSON, R [1 ]
ZORN, B [1 ]
机构
[1] UNIV COLORADO,DEPT COMP SCI,BOULDER,CO 80309
来源
SOFTWARE-PRACTICE & EXPERIENCE | 1994年 / 24卷 / 11期
关键词
OBJECT-ORIENTED PROGRAMMING; INHERITANCE; MODERN PROGRAMMING LANGUAGES; LANGUAGE COMPARISON; COMPILER PERFORMANCE EVALUATION;
D O I
10.1002/spe.4380241106
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Object-oriented programming has become a widely used, important programming paradigm that is supported in many different languages. C++ has become the most widely used object-oriented language and many C++ programmers are unfamiliar with the different approaches taken by other languages in the paradigm. This paper is intended as an introduction to a broad range of ideas in object-oriented programming. Specifically, we introduce four modern programming languages that support object-oriented programming (Oberon-2, Modula-3, Sather and Self), and show how a simple application is coded in these languages. While each of these programming languages provide support for inheritance, dynamic dispatch, code reuse, and information hiding, they do so in very different ways and with varying levels of efficiency and simplicity. The use of a simple example, based on a common programming problem, facilitates our comparison. We have coded the application in all of these languages, including C++, and we compare the compile times, object code sizes, and run times of the available implementations. Implementations of all the languages compared and all of the programs we measure are available on the Internet. Ultimately, our goal is to encourage and facilitate programmers in understanding and exploring a variety of object-oriented programming languages.
引用
收藏
页码:1077 / 1095
页数:19
相关论文
共 50 条