Skip to content

Feature request: Generic comptime variables #160

@sudokit

Description

@sudokit

Support for passing compile time constants in generics would be useful. for example something like:

struct Vec<T, N: usize> {
    data: T[N];
}

Not sure how he syntax should be, but could maybe be something like:

struct Vec<T, comptime N: usize> {}

or just

struct Vec<T, comptime N> {}

not sure how it would go mixing the types and constants in same generic definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions