Verse is a strongly-typed programming language, which means a type is assigned to every identifier. With strong typing, code won't produce unpredictable results during runtime because the types for identifiers are known, along with how operations affect those types.
There are instances where the type is not explicitly required, such as when creating a constant. In the example MyConstant := 0
, the type for MyConstant
is inferred to be int
because an integer value is assigned to it even though the int
type wasn’t explicitly provided. In instances like this, the type is inferred.
Verse has built-in types that support the fundamental operations most programs need to perform. You can create your own types by combining these into larger structures, but these common types are important to understand as the foundation for using variables and constants in Verse.
The following pages describe the common types of Verse: