Many hyperlinks are disabled.

Use anonymous login
to enable hyperlinks.

Overview

Artifact ID: | deedbf6b3950a7a74bafe270aded659107a5e527 |
---|---|

Page Name: | Types |

Date: | 2011-07-15 19:45:31 |

Original User: | MauganRa |

Parent: | f3dbfa64f4f3ac5e136733bcfd17ed02f5b34b06 |

Content

# Types and the type system

## Algebraic types

Blend is based on an algebraic type system. Algebraic types are composed out of other types using constructors. This is also possible with tuples.## List of basic types

Although additional types are scheduled to be implemented, I chose these basic types to implement and make available immediately since they seem to me to be the most important ones.### Integer types:

- Bignum:An integer type with nearly unlimited precision
- Int8, Int16, Int32, Int64, Int128: Signed integers with the indicated length
- UInt8, UInt16, UInt32, UInt64, UInt128: Unsigned integers with the indicated length
- Rational: A rational number of unlimited precision
- Float32, Float64: IEEE floating point numbers of different length
- Complex32, Complex64: Complex numbers consisting of two IEEE floating point numbers of the appropriate length

### Special types:

- Boolean: has two literal values (True and False) which represent truth values
- Maybe: Has two constructors (Nothing an Just) which represent either nothing or a value.
- Either: Has two constructors, Left and Right. The Left constructor holds an error, the right one a result.