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

Add impls on primitive types in stdlib #736

Closed
jfecher opened this issue Feb 2, 2023 · 0 comments · Fixed by #847
Closed

Add impls on primitive types in stdlib #736

jfecher opened this issue Feb 2, 2023 · 0 comments · Fixed by #847
Labels
enhancement New feature or request

Comments

@jfecher
Copy link
Contributor

jfecher commented Feb 2, 2023

Problem

We have several functions like std::array::len(myarray) which would be more ergonomic to use if they could be accessed with method syntax myarray.len(). Other examples include std::field::to_le_bytes, to_bits, etc.

Solution

Allow impls for primitives as long as the impl is defined within noir's stdlib or compiler itself.

@jfecher jfecher added the enhancement New feature or request label Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants