Aggregate Types

Structs &¬†classes are covered above. Literals are also provided, as examples. Ones marked as “feature TBD” might not necessarily make the cut.

// simple arrays
int[] a = [1, 2, 3];		// array of integers (similar to int* in C)
int[][] b = [[1, 2], [3]];	// jagged array (similar to int** in C)
int[,] c = [1, 2; 3, 4];	// (feature & literal syntax TBD) multidimensional array (similar to int[2][2] in C)
int[!] d = [1, 2, 3];		// (feature TBD) immutable array; strings are `char[!]`
// associative arrays (maps)
int[string] a = ["foo": 3, "bar": 4];	// (literal syntax TBD) associative array of `string`=>`int`
// sets
void[string] a;	// (feature & literal syntax TBD) set of `string`

Other aggregate types (such as linked lists) are created using generics. Syntax was considered for linked lists (something akin to int[>] for singly-linked and int[<>] for doubly-linked), but that would likely just create confusion.