New crate: num-primitive

I've published the new num-primitive crate with traits for generic programming with primitive numeric types. This is similar in spirit to num-traits, but aims to be exhaustive in exposing standard library functionality. The traits are sealed against downstream implementations so we can feel free to add additional methods, supertraits, etc. as they are stabilized in the standard library, without it being a breaking change.

So if you want generic numbers, and don't need to support third-party types, please check it out!

20 Likes

We do that a lot, but we found that you need a lot more stuff—in particular, generic interplay with atomics, and trait-able up/down casting. That's what common-traits provides. And, yes, the name is misleading and horrible. :slight_smile:

2 Likes

Thanks for the work, I use num-traits a lot :smiley:

I think the link is wrong :wink:

Oops, I fixed that link, thanks!

1 Like