The type system and how it is used is a commonly misunderstood aspect of the Dylan language. Although it lacks some forms of expressiveness in the current incarnation, it also has some features that aren't found in many languages, such as singleton types. It is also very important in helping the compiler to generate faster yet still safe code.
One interesting feature in Dylan is that it is optionally typed. While this is more common today and sometimes has fancy names applied like 'gradually typed', the overall point is the same: Your code can start out untyped and looking like code does in Ruby or Python. However, when you want or need additional performance or correctness guarantees, you can supply type annotations that the compiler can use. The compiler can also infer some types from the values used or other type annotations.
In this post, we'll explain some of the basic concepts of the Dylan type system and show how it is used by the compiler.
Type and Value Relationships
There are 2 important relationships between values and types in Dylan.
They are instance? and subtype?. Other relationships, such as known-disjoint? are used within the compiler to assist ...
There are comments.