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.

If you are familiar with Rust, you will find the Zinc type system very similar, 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) {}