Slice Type
Like all type expressions, this expression produces a value of the type type.
Also known as a 'slice handle.'
Slice-typed values contain a sequence of values, where each value's type is of the operand's type value.
Assertions
- The operand is a value of the type type which is runtime representable.
Representation
Values of any slice type are represented as:
- a pointer type on the target platform, which points to the slice's first element, and
- a pointer-sized unsigned integer on the target platform, which holds the slice's length.
A slice's elements are contiguously allocated.
Syntax
A slice type is produced by the [] unary prefix applied to an expression; see the expression grammar.