Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JSAbrahams opened this issue Jan 24, 2023 · 0 comments
Open

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

JSAbrahams opened this issue Jan 24, 2023 · 0 comments
Labels
code quality: general Code quality issue not relevant to a particular module

Comments

@JSAbrahams
Copy link
Owner

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.

@JSAbrahams JSAbrahams added the code quality: general Code quality issue not relevant to a particular module label Jan 24, 2023
@JSAbrahams JSAbrahams added this to the v0.4 | Mutability milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality: general Code quality issue not relevant to a particular module
Projects
None yet
Development

No branches or pull requests

1 participant