Types

Zinc is a statically typed language, thus all the variables must have a type known at the compile time. Strict type system allows to catch the majority of runtime errors, which are very common to dynamically typed languages. Zinc type system closely resembles that of Rust, but with some modifications, limitations, and restrictions.

Types are divided into several groups:

To read more about casting, conversions, and type policy, go to this chapter.

You can declare type aliases in Zinc, which allow you to shorten type signatures of complex types by giving them a name:

type ComplexType = [(u8, [bool; 8], field); 16];

fn example(data: ComplexType) {}