Dynamic messages, as proposed in [Nis98], are first-class expressions that may occur as messages within programs: being first-class, they may dynamically be bound to program variables, and evaluated to “ordinary ” messages during the computation. We present an extension of Abadi and Cardelli’s typed calculus FOb <: [AC96] and a type system that give provision for dynamic messages. The new type system retains the flexibility and expressive power of the original system of [Nis98] while relying on a new class of types, called message types, to capture the desired typing of dynamic messages. We prove type soundness and the existence of minimum types for the new system. We also study the formal relationships between object types and message types, and discuss how message types can be encoded in terms of object types.
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.