
Build Your Own Programming Language
By :

In this book, the phrase structured type will denote composite objects that can hold a mixture of types whose elements are accessed by name. This contrasts with arrays, whose elements are accessed by their position and whose elements are of the same type. In some languages, there are struct or record types for this kind of data. In Jzero and most object-oriented languages, classes are used as the principal structured type.
This section discusses aspects of how to check the types for operations on classes and, more specifically, class instances. This organization mirrors the presentation of array types at the beginning of this chapter, starting with what is needed to process declarations of class variables.
The original intent of Jzero was to support a tiny Java subset that was somewhat comparable to Wirth's PL/0 language. Such a language does not require class instances or object-orientation, and space limitations prevent us from covering...