We've talked about types before, mostly in regard to the integer and floating point number types (e.g., i32 or f32). Cone offers a rich, versatile collection of types, whose documentation extends across quite a few chapters.

What is a type? Broadly speaking, it is a pattern that:

Every value in a program has a type, known at compile-time due to an explicit declaration or because the type can be easily inferred based on the context. By knowing the types of all values, the compiler can optimize a program's performance and memory use. Clear typing facilitates precise, flexible data manipulation and improves the safe and correct use of data.

This page provides a helpful overview of Cone's diverse range of types. These enable definition of custom types as needed by a program or library.

Concrete types

The concrete types are used to instantiate specific data values:

System Resource Types

These types facilitate low-level, safe use of memory, functions and threads.

Template types

Using template metaprogramming, one can define a collection of types that share common logic, but whose implementation details vary according to the specific type parameters applied to the template. Most indexed collection types are implemented using templates. Thus, hash-indexed collections share a similar logic, but that logic varies according to the specified types of the hash and element values.

_