Skip to content

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

@JSAbrahams

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.

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