Blend

Artifact [deedbf6b39]
Login

Artifact deedbf6b3950a7a74bafe270aded659107a5e527:

Wiki page [Types] by MauganRa 2011-07-15 19:45:31.
D 2011-07-15T19:45:31.253
L Types
P f3dbfa64f4f3ac5e136733bcfd17ed02f5b34b06
U MauganRa
W 1258
<h1>Types and the type system</h1>

<h2>Algebraic types</h2>
Blend is based on an algebraic type system. Algebraic types are composed out of other types using constructors. This is also possible with tuples.

<h2>List of basic types</h2>
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.

<h3>Integer types:</h3>
  *  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

<h3>Special types:</h3>
  *  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.




Z 175bc01795a5a93b559a0a5ec0c5b9df