Language / Dependent types (const parameters) (design)

Dependent types (const parameters) (design)

This page covers Silk’s intended support for types that mention compile-time values (especially integers), such as dependent-length collections.

Full reference: dependent types.

Example (Design)#

// Design-only sketch: a vector type with a compile-time length `N`.
struct VectorN(T, N: int) { /* ... */ }

See also#

Source repository · Edit this page · View Markdown