Type Conversions

What conversions are

Given an object of a particular type and and encoding, a conversion will produce another object of a different type or encoding, corresponding in some way to the original object.

Conversions are similar to methods, except that they are defined for a type and encoding, whereas methods are simply defined for types. Conversions also do not take any additional arguments; methods can. Like other TOP operations, conversions do not actually mutate objects, but produce new ones.

How conversions are defined

Conversions can be registered in the type description object for the type being converted from (the "original" type). They do not, however, form part of the type definition of that object. They are not inherited in subtypes.

The following information is part of a conversion definition:

In addition, the description of a conversion can identify known agents that can carry out the conversion.

(Semantics as such is not in there. It probably should be. The closest thing I have now is "top".)

Compound conversions

Trivial conversions
spok@cs.cmu.edu (Last updated 4-Jan-95)