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

Quick links

Type to search across the site. Use the up and down arrow keys to choose a result, Enter to open it, and Escape to close.