You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Oleh, we're currently looking to reduce the size of the stdlib as mentioned in #1258 so we're probably not going to include this. I think it would be best to have a num-traits crate similar to rust as this can then change without it being a breaking change to the language as a whole.
Problem
For some generic functions, it is useful to accept any numeric value(u8, u32, u64, U128 etc). E.g.,
A real world use case is
nodash::sqrt
: https://github.com/olehmisar/nodash/blob/727116ea69261d9e91454d93af36f0851df5c35c/src/math/sqrt.nr#L5-L8I implemented a
Numeric
trait inside nodash for that but it would be nice to have this trait in the Noir std lib.https://github.com/olehmisar/nodash/blob/727116ea69261d9e91454d93af36f0851df5c35c/src/math/numeric.nr
Happy Case
Add
Numeric
trait to Noir std lib. The name is not final.Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
Nice-to-have
Blocker Context
No response
Would you like to submit a PR for this Issue?
Maybe
Support Needs
No response
The text was updated successfully, but these errors were encountered: