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 - Robert Hutson

Discussion 1:
Article URL:
Article title: "Smalltalk, C++, and OO COBOL: The Good, the Bad, and the Ugly"

This paper was a relatively good comparison of the object-oriented languages Smalltalk, C++, and OO COBOL. It touched on several language-specific issues such as garbage collection, performance, dynamic binding, upward compatibility, multiple inheritance, and class schemas. Throughout the article, issues as to how certain aspects of the language affect programmers who are using it are mentioned.

The first issue discussed was that of memory management (i.e. automatic garbage collection). Most programmers would not want to have to check for unused objects and delete them to prevent system memory leaks. Fortunately for the OO world, this is handled automatically in both OO COBOL and Smalltalk, just not in C++, mainly because C++ operates on a lower level, being just a step above assembly code. It was even mentioned in the article that COBOL programmers may never have heard of memory leaks, which occur when "parts of memory are no longer used by the program but the program does not know how to reclaim the memory space." A major drawback of using C++ is its complexity alone. It is in fact, even more complex than its objectless counterpart C. Complexity generally makes it more difficult to write productive applications (or applications productively). Of course there are also performance differences between languages. It is said that a good Smalltalk programmer will produce an object-oriented program that will run as fast as the average C++ program. The efficiency of C++ in this case is its use of pointers (to memory addresses). This allows for direct alloction/manipulation of addressable memory. COBOL runs slower than C++ and Smalltalk in most cases because Smalltalk is constantly being optimized/improved. Another important issue in any object-oriented language is dynamic binding. Smalltalk uses this approach since everything in it is considered an object (even ints and booleans). This makes it a very efficient development envirmonment. Objects can be inspected and even changed at run-time in Smalltalk, and OO COBOL supports dynamic binding, while languages like C++ use static binding. A unique feature of OO COBOL is its upward compatiblity with programs written in COBOL, the older functional/structural language. C++ is compatible with C in a similar sense. Multiple inheritance, which is the ability of an object to inherit characterists of more than one parent object (java~superclass), is implemented in OO COBOL and C++, but not Smalltalk. This is an important thing for a program to have accessible when writing business applications, because often times they need to be able to dynamically change the type of object without making copies of the original object. The Smalltalk version of this is a thing called object 'roles', and roles allow an object to have multiple types and change at run-time. C++ does not have this feature. That basically covers what this paper discussed in terms of the different OO languages and how certain features affect programmers.

Ejike Onyekwuluje posted a discussion on an article that also discusses and compares object-oriented languages such as OO COBOL, Smalltalk, and C++. One thing worth noting is that it mentions Smalltalk is the only 'pure' OOPL of these 3, where OO COBOL and C++ are hybrid. In a 'pure' OOPL, everything is an object. His discussion also mentions the issue of multiple inheritance, as it is not implemented in Smalltalk, but it is in languages like C++ and OO COBOL. Also, there's the issue of static vs. dynamic typing, where static typing is found in compiled languages, but usually not interpreted languages such as Smalltalk.

Links to this Page