Work

Type Compatibility for Extensible Module Types, Their Reference Parameters, and Their Pointer Types

Year: 1997
Type: article
Abstract: : Objects in object-oriented languages have often been treated as a special kind of entity different from other variables or constants. Similarly, their types, which are typically called classes, have often been treated differently from other types. This complicates the understanding of these concepts. The present paper proposes to see the classes as module types leading to a very natural integration of objects and classes into the framework of contemporary programming languages. The main part of the paper contains typing rules for module types for assignment and for value and variable parameters. It is shown that the rules for reference parameters in some existing languages lead to unexpected results and sometimes to undefined behavior. Furthermore, assignment involving dereferenced pointers to modules is studied for the first time in detail. The paper shows that the type compatibility rule for pointer assignment is not sufficient for deref assignment. The last part of the paper contains a comparison of the language definitions and of compilers for Borland Pascal with Objects, C++, Oberon, and Object CHILL. Key Words: Object-Oriented languages, extensible module types, parameters and parameter
Language: English
Subfield: Software
Open Access status: green
OpenAlex ID: W25532440
FWCI:
Cites: 4
Cited by:
Related to: 10