CL/CLOS and Smalltalk

Smalltalk, like Allegro CL's CL/CLOS (Common Lisp Object System) is a dynamic object-oriented, general purpose programming language. New behavior can be dynamically added at any time with both languages, making them exceptionally easy to develop with. Code can be dynamically debugged and fixed "on the fly," without the need for time-consuming debug-edit-recompile cycles. Incremental garbage collection automatically and unobtrusively reclaims memory, retaining performance while eliminating a major source of programmer error. Native machine compilation dramatically increase performance over interpreted systems.

Yet despite their similarities, Smalltalk and CL/CLOS have specialized in different areas, and the languages now tend to be used in different domains. Here, we identify the different ways they are currently used in order to give you an idea how to evaluate where one or the other language is appropriate.

Smalltalk's Approach

The Smalltalk language was originally developed by Alan Kay in the early 1970's as part of the "personal computing" revolution. Kay named his language "Smalltalk" and used it as the programming language in his "KiddiKomp/Dynabook" personal computer prototypes. From the start, Smalltalk was designed to be simple, simple enough to teach children how to write programs. The language also emphasized object-oriented graphical class libraries, and it is this aspect of Smalltalk that has made it a commercial success.

Smalltalk's current commercial market is MIS corporate developers, who use it as a development environment for the client side of client/server database access applications. Commercial Smalltalks come with large GUI toolkits consisting of hundreds of classes devoted to visual GUI components. Their dynamic object-oriented nature makes them much easier to use and extend than either traditional C++ style GUI development environments or proprietary object-based environments such as Powerbuilder. As a result of its evolution as a development environment for building client-side applications in corporations, Smalltalk has also acquired a strong ability to access relational databases.

As far as Smalltalk's simple object model is concerned, this is both an advantage and a disadvantage. Smalltalk implements objects "from the ground up." This makes the languages object model easy to understand, and the GUI class framework is mature, well-documented and time-tested. However, in Smalltalk everything is an object, from functions to loops to entire applications, which makes optimization difficult. In addition, the object model does not include modern enhancements such as multiple inheritance, method combination or mixins, all of which can be leveraged to maximize programmer productivity and code optimization.

One other potential drawback of Smalltalk environments is the idiosyncratic nature of their interfaces. The Smalltalk GUI framework, while very powerful, was designed and built long before the current crop of modern GUIs such as Windows. The Smalltalk GUI frameworks currently remain poorly integrated into the modern GUIs, giving them an idiosyncratic "look and feel."

Overall, current implementations of Smalltalk tend to make it fast and easy to build GUI-based applications. Delivery is a second priority. Such applications tend to have a large footprint, relatively low performance and an idiosyncratic "look and feel." They tend to be delivered in a corporate environment, where the cost of a custom GUI-based application (often requiring upgraded hardware and extra end-user training and support) can be justified.

CL/CLOS: Designed for Systems Development

The history of CL/CLOS is markedly different from that of Smalltalk. CL/CLOS has historically evolved as a development tool for large-scale systems development. CL/CLOS (and its precursor Lisp dialects) have been typically used in areas such as process control, configuration management, artificial intelligence, symbolic mathematics and computer-aided design. A unifying theme in these diverse areas has been the ability to extend the language in domain-specific ways. This background has shaped CL/CLOS in quite different ways than Smalltalk.

For example, the object system of CL/CLOS is much more modern, supporting multiple inheritance, method combinations and a meta-object protocol. These features enable programmers to handle large, complex programming tasks with more flexibility, and support a high degree of optimization for speed. Integration with native operating system, the native Windows systems and with other languages such as C is much simpler with CL/CLOS systems than with Smalltalk systems. Smalltalk tends to be more of a "closed world," while CL/CLOS systems tend to use other (non-CL/CLOS) software components.

Finally, and perhaps most importantly, CL/CLOS supports large systems development at the language level much more effectively than Smalltalk. The key features are several:

  • Support for modules (or packages), preventing name clashes
  • Factoring applications into separate class frameworks which can be mixed together by use of multiple inheritance, permitting flexible, runtime extensions for the application
  • Extending the language itself to capture domain-specific paradigms, permitting compact, easy to understand code

Copyright © 2014 Franz Inc., All Rights Reserved | Privacy Statement
Delicious Google Buzz Twitter Google+