Dodo doc > Types > Use as Prototype
A type can be used as prototype, or model, for a new type. The new type inherits the declarations of its prototype and can define new ones. By default the new type also inherits the default value of its parent type as prototype for all of its instances.
def ExHouse = new House
ExHouse(Colour?, Colour?, Integer?)
Note: If the name of the type is not known, use underscore "_" as name for the constructor.
A declaration in the parent type can be overridden in the new type by giving it a new definition or a new type signature. To indicate that a declaration is overridden, the name of the variable or type should be prefixed with "^". If a variable or function uses the extended syntax the "^" sign should appear before the first single quote.
An overriding attribute declaration should have a
type compatible with the parent, and the parent type should be compatible in return. This usually means the types are identical.
An overriding function declaration should return a
type compatible with the parent return type. The parent parameters type
should be compatible with an overriding
function parameters type. If they are references the overriding
function parameters type should also be compatible with the parent
parameters type, which usually means they are identical.
def ^name = "Rita" World3 ^worldDomination(Robots, Satellite, Crank)