View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 1 - Michael Levy

Object-Oriented Programming


Programming Language Comparison
Author: Jason Voegele
http://www.jvoegele.com/software/langcomp.html

The article I read states that the six things that most agree all object-oriented languages have are:

1) Encapsulation/Information Hiding
2) Inheritance
3) Polymorphism/Dynamic Binding
4) All pre-defined types are Objects
5) All operations performed by sending messages to Objects
6) All user-defined types are Objects

Eiffel, Smalltalk, Ruby, Java, C#, C++, Python, Perl, and Visual Basic are the languages that are compared with regard to the qualities of being object-oriented as described above. The following tables, taken from the article, shows how each language stands up to these criteria.

Eiffel Smalltalk Ruby Java C# C++ Python Perl Visual Basic
Encapsulation / Information Hiding Yes Yes Yes Yes Yes Yes No Yes? Yes?
Inheritance Yes Yes Yes Yes Yes Yes Yes Yes? No
Polymorphism / Dynamic Binding Yes Yes Yes Yes Yes Yes Yes Yes? Yes (through delegation)
All pre-defined types are Objects Yes Yes Yes No No No Yes No No
All operations are messages to Objects Yes Yes Yes No No No No No No
All user-defined types are Objects Yes Yes Yes Yes Yes No Yes No No

Two of the most interesting things to catch my eye of all these languages, in regards to how they can be used, is how they stack up in regards to static vs. dynamic typing and generic classes.

Voegele describes the differences between static and dynamic typing as dynamic typing tends to be more flexible, thereby increasing productivity; whereas static typing is safer, more reliable and increases efficiency. Now it is possible to make static typing just as flexible as dynamic, however it takes much more well-defined type system. Of the languages compared in the article, Smalltalk, Ruby, Python and Perl are dynamic and the rest are all static.

Another way to make static type languages more flexible is through the use of generic classes, more specifically, the language’s ability to parameterize a class with specific data types. Of the static languages compared, only Eiffel and C++ support generic classes.

This relates the most closely to Alex Groleau's discussion one posting most notably because his discussion is based on the same article as mine. However, he goes more into depth as far as what it means to be an object-oriented language. This is an important matter to take into consideration, even before the content in my discussion, since the content discussed here is irrelevant if the language cannot even be classified as object-oriented.

In my opinion, until a language is created, that is infinitely flexible as well as extremely reliable and safe, there is always going to be differing languages available. Each language is going to have its strengths and weaknesses and it's up to the programmer to decide which language best meets the requirements for whatever it is being used for.

Links to this Page