Skip to content

Specify vectors are non-empty at compile time? #453

Description

@JSAbrahams

Summary of current issue

So I'd been wondering whether there was a way that we can specify that a vector always contains at least one element.
Found a cool wrapper which guarantees this at compile time.

Proposed change

If we use this in as many places as possible, then we can guarantee a lot of extra properties at compile time.
This prevents us from implementing superfluous logic for syntax errors in the

  • Check and...
  • ...Generate stages

This should also greatly reduce the amount of unreachable branches in the current implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code quality: generalCode quality issue not relevant to a particular module

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions