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

My Old Discussions

Discussion 1




“Programming Language Comparison”
by Jason Voegele
http://www.jvoegele.com/software/langcomp.html

Every object oriented programming language attempts ease the programmer’s task by offering some degree of abstraction and modularity so certain aspects of the program can be focused on separately without worrying about the underlying system interactions. Most OO languages support encapsulation, inheritance, and polymorphism to achieve this; however, the features of each language make this implementation very different between languages. The above article compares features of Eiffel, SmallTalk, Ruby, Java, C#, C++, Python, Perl, and Visual Basic.

SmallTalk, Ruby, Eiffel are considered to be “pure object oriented languages” because other than implementing (1) encapsulation, (2) inheritance, and (3) polymorphism; (4) all their pre-defined types are objects, (5) user-defined types are objects, and (6) operations are messages sent to objects. Java has basic statically defined types and arithmetic operators are built in so (4) and (6) are not included. C++ like the name describes is an addition to C. It offers the ability to work with low level procedural programming for greater efficiency, but also the abstraction of object oriented programming making it flexible in use, but more complex. So, obviously it does not support the OO “guideline” of (4), (5), and (6). Python doesn’t by design support encapsulation. It doesn’t have the public/protected access specifiers or implementations common to keep the user from tinkering with the internal state of the object.

Static and Dynamically defined types are another main difference between these languages. Dynamic types allow for variables to be declared as any type (value or object) and the types assigned to the variables are resolved at runtime. SmallTalk and Ruby have this feature (this seems more common in interpreted languages rather than compiled languages). This can allow for flexibility and change; however programmer has to check himself to ensure that the variable is holding the right kind of object he expects. This can cause “message not understood errors”. Statically defined types as those found in Java and C++ ensure that the object or value stored in the variable is compatible with the specific storage type. The compiler should point out the specific problems while dynamic type problems may be tougher to track down and require more testing. However, in C++ at least, implicit or explicit casting of variables can cause problems too that the compiler never detects. This can be as annoying. C++ though does have the ability to use templates or generic container classes that allow for dynamic assignment of variables without giving up the security of static types. The new version of Java should be able to implement generic classes as well.

Many other features are discussed as well including how the different languages implement inheritance and polymorphism. An interesting inclusion in the discussion is the Capers Jones Language level. The number is based on the number of lines needed to complete a function point. A function point is simply a measure of the size of a computer application from a user standpoint regardless of development method, language used, technology, and capability of the software team involved. It is basically a somewhat arbitrary number that can represent how productive a team can be using the particular language. SmallTalk had a much higher value of 15, while Java and C++ both had a value of 6. According to the study typically more could be accomplished in SmallTalk in a shorter amount of time than in Java and C++.

Much like Hitesh Kanwathirtha’s paper Voegele explains the various features and differences between several different OO languages to give the reader an idea of why a person may use a specific language over another. It also provides a pretty thorough framework for comparison including things from how polymorphism and inheritance is implemented to typing and security. Also, included in the discussion is the development time and efficiency of the programming languages based on the Caper’s Jones Language Level which R. Steven French’s paper mentions.

Missing File (/cs2340/uploads/Design%20Patterns.htm)

Link to this Page