Programmer Reference : Common Language Data Types
Common Language Data Types
The Common Language Data Types subsystem (CLDT) provides a platform-independent interface and implementation for the basic data types that form the building blocks of the Smalltalk programming environment. For convenience the CLDT classes have been grouped into seven categories: Boolean, collection, magnitude, graphical, stream, support, and exception handling.
The specification for CLDT is based primarily on two sources:
Smalltalk-80: The Language and Its Implementation (the "Blue Book"), available from
ANSI/NCITS 319-1998 Smalltalk Programming Language (the “ANSI Smalltalk Standard”), available in PDF format from
All data types in the CLDT subsystem are concrete classes, that is, they are meant to be instantiated and used directly in programs. To avoid constraining implementations, no inheritance hierarchy has been defined for CLDT. However, there is a set of basic messages that all the CLDT data types are assumed to support. Because in all existing implementations this common behavior is implemented in class Object, it will be referred to as "Object behavior". It is convenient to include a description of Object behavior in this section, even though Object itself is not a CLDT data type because it is an abstract class.
Some methods have been added to the original CLDT definition to align the VA Smalltalk implementation with the ANSI Smalltalk standard. Additional methods have been added to improve portability between VA Smalltalk, Squeak/Pharo, and VisualWorks. These methods are identified specifically only in the small number of places where their inclusion requires clarification.
Our aim in this section is to provide an overview of CLDT, assuming that readers are generally familiar with Smalltalk.
One of the primary motivations in the design of CLDT was to achieve maximum functionality with minimum complexity. Most inexperienced Smalltalk developers complain that the class library is too large, needlessly complicated, and consequently difficult to learn. There is clearly a trade-off between the utility and additional functionality provided by a large library, and the steep learning curve that it entails. The methods in CLDT have been chosen because they provide real added value, by which we mean that they truly save developers both time and effort.
In addition, we will occasionally provide some tips to developers who already know the base Smalltalk/V or Objectworks\Smalltalk dialects, and want to leverage that knowledge to get up to speed quickly on CLDT. Because these tips are especially useful when you are porting some existing code to VA Smalltalk, these paragraphs are marked by the legend Porting tip.
Porting tip:
These tips compare and contrast CLDT with the base classes in the unmodified versions of Smalltalk/V or Objectworks\Smalltalk as shipped by the vendors. Differences between CLDT messages and those supported in Smalltalk/V or Objectworks\Smalltalk are noted. Many of these differences result from different strategies for error handling and other implementation-dependent features. While CLDT sometimes omits a method that is included in either Smalltalk/V or Objectworks\Smalltalk, in most cases the omitted method is either rarely used or has a trivial implementation. The preferred Smalltalk programming style is to in-line trivial methods; accordingly we have not cluttered the CLDT class libraries with methods that are seldom or never used.
Last modified date: 01/29/2015