Go home now Header Background Image
Search
Submission Procedure
share: |
 
Follow us
 
 
 
 
Volume 3 / Issue 2

available in:   PDF (105 kB) PS (81 kB)
 
get:  
Similar Docs BibTeX   Write a comment
  
get:  
Links into Future
 
DOI:   10.3217/jucs-003-02-0120

 

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

J├╝rgen F. H. Winkler (Friedrich Schiller University Jena, Germany)

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.

Keywords: Borland Pascal with Objects, C++, Oberon, Object CHILL, Object-Oriented languages, deref assignment, extensible module types, parameters and parameter passing

Categories: D.3