Subtyping, assignment and cloning in a concurrent, object-oriented language

Abstract: This paper describes subtyping, assignment, equality and cloning in a concurrent, object-oriented language called Rapide. Based on experiments and language design considerations, we separate the subtype relation from the derivation (or inheritance) hierarchy. This avoids various anomalies and has the added benefit of reducing the syntactic and design complexity of programs that use intricate subtype relationships. A relatively sophisticated algorithm to decide subtyping is also needed for implementation. Objects may contain multiple threads, and different objects with the same type may have different implementations. This makes it difficult to provide a meaningful, predefined form of "copy" assignment or predefined equality tests. Therefore, the primitive form of assignment in Rapide is a form of pointer assignment. Special provision is made for user-defined "cloning," so that an object may produce a meaningful copy of itself. Equality may be user-defined for any type, in some cases overriding an "inherited" predefined equality.