Go to Deriscope's documentation start page

Deriscope_Type

In Deriscope terminology, a type is similar to the "class" in object oriented programming languages, such as C++.
It is a name that describes the family of all possible
Deriscope Objects that share certain properties.

Just like in an object oriented programming language, the types in Deriscope exhibit hierarchy through the following cascading structure:
At the top is the type named
Type that characterizes the family of all possible objects.
It is the parent of all other types.
It has the following immediate (first generation) children:
Tradable
Quotable
Market
Model
Data
Each of the above types is itself the parent of several other types.

For example, there is a type named Tradable, which is the parent of several children, such as
Currency, Swap and Option.

The meaning of this hierarchy is as follows:
Let two types named MyChild and MyParent, and let MyChild - as the name betrays - be a child of MyParent.
Any object of type MyChild is then necessarily also of type MyParent.
Due to this, we may say for brevity, that MyChild is MyParent, although strictly speaking they are different types, since their respective families of member objects are different.
The reverse is not necessarily true.
MyParent is not MyChild in the sense that an object of type MyParent cannot be generally treated as an object of type MyChild, except if by coincidence that object happen to also be of type MyChild as well.

This child-parent relationship is fully respected in the spreadsheet level.

For example, if some function requires the input of a
handle name and expects the respective object to be of type MyParent, then it will not complain if it is passed the handle name of an object of type MyChild.
Reversely if the function expects an object of type MyChild but receives an object of type MyParent, it will report an error, except if the passed object happens to be also of type MyChild.

The above child-parent relationship is transitive, meaning that it still holds after parent, MyParent, child, MyChild are replaced with ancestor, MyAncestor, descendant, MyDescendant respectively, where ancestor is defined inductively as either the parent or the parent of some ancestor and similarly for the descendant.