Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Discussion 1 - Ejike Onyekwuluje
Object-Oriented Programming Languages by J. Chitu Okoli
In the article, the author discusses some of the features of OOPLs that make them distinctively object?oriented objects. The OOPLs considered in the article include but not limited to Smalltalk, Simula, C++, OO COBOL and Common-Lisp Object System (CLOS). The author defines OOPL as “…one which supports encapsulated objects which can share behavior.” Therefore, he believes the implementation of encapsulation and support for shared behavior are the defining qualities of an OOPL.
A pure OOPL is one in which all data types are objects. While Smalltalk is the main pure OOPL, other languages such as C++ and OO COBOL are hybrid, in the sense that primitive data types such as integers, reals, characters, etc. exist which are not objects and which are not considered in the same ways as objects. CLOS integrates the object system with the Common Lisp substrate, and considers most values uniformly as objects.
The degree of Encapsulation varies among different OOPLs. In Simula, information hiding does not exist with both data and members of any object being fully accessible to the outside world. Smalltalk and Objective-C do not allow access to object data (variables) from routines outside the object, but give routines full access to the object's methods. Hence, data can be accessed indirectly through an object's methods, but only if the object defines a method that gives this access. The CLOS works in a similar way, except that it uses accessors instead of methods to access object data. Eiffel and C++, allow the programmer to specify the accessibility of methods and data. While Eiffel allows the programmer to specify which members can be accessed from outside the object, the C++ extends beyond by allowing the programmer not only to specify which members are available to the general public, but also to specify which functions or other classes that can have access those members normally accessible only by methods within the object.
Although all class-based languages treat classes as types, some go further by treating them as objects as well; in these OOPLs, classes are object instantiations of metaclasses (classes which define classes). Languages that support metaclasses include CLOS and Smalltalk. Also, although all class-based languages support single inheritance, some OOPLs, including C++, CLOS, OO COBOL and Eiffel, support multiple inheritance.
Static and Dynamic typing was also noted in the article. Whilst static typing has been a feature of almost all compiled programming languages, mainly because of the ease of implementation and efficiency of compiled code produced. Most of the pure object oriented languages such as Smalltalk and CLOS use dynamic typing by allowing their languages to be interpreted rather than compiled.
The article also points out that different OOPLs were designed to address specific purposes. For example, Simula added the ideas of class and inheritance to produce a programming language designed for simulation and modeling, Smalltalk was designed to make graphical programming easier, and Eiffel was designed primarily to address the goals of reusability, extendibility and reliability.
In conclusion, I think that even though, the author argues that the astronomical increase in hardware quality accompanied with a corresponding drop in cost has made concerns such as saving memory space and increasing speed a matter of less concern for static typing, I think that static typing is still more reliable than dynamic typing. The discussion by Elizabeth Solomon on Static Dynamic typing validates this view. Elizabeth Solomon points out in her discussion “Whilst dynamic typing allows flexibility, the programmer has to make sure the right type is being passed in. Where as the compiler ensures compatibility with the type in a static typing environment because all variables are declared with a specific type. Hence more safe and reliable.”
Link to this Page
- Ejike Onyekwuluje last edited on 9 December 2005 at 8:20 am by cache-rtc-ae04.proxy.aol.com