Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion LanguageTutorialBasic Types

Basic Types

Numeric types

signed integers    unsigned integers   floating point values
  i8                 u8
  i16                u16                 f16
  i32                u32                 f32
  i64                u64                 f64
  i128               u128                f128

Currently, only i32 is supported well.

The default type of integer constants is currently i32, but this will most likely be changed to i64.

Boolean type

Boolean values true and false are of type bool, which is the required type for conditions used, e.g., in if statements or in pre- and post-conditions.

Note that bool is fully implemented as a choice type of data-less features TRUE and FALSE.

Character types

There is no character type. It seams risky to define a type for the current 17 planes of Unicode code points. UTF-8 can address 32 planes in 4 bytes, chances are high that someone will find a use for the additional planes or even extend UTF-8 to support more than 4 bytes per code point. Using i32 for a code point seem sufficiently safe for future Unicode changes.

nil type

nil is defined as a data-less feature in the standard library. It is intended to be be used to represent the absence of a value. Examples may be a list's tail that is empty or the result of a lookup that failed.

void type

void is defined as a data-less feature in the standard library. It is intended to be be used to represent the absence of a result. The most common use would be the result of feature in case it is not desired that the caller gets hold of the feature's instance.


next: Integer Types