rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
731 stars 135 forks source link

Documentation should state the purpose of the num-traits crate #259

Open CaliViking opened 1 year ago

CaliViking commented 1 year ago

The thing I find most confusing about num-trait is that there is no definition of the purpose and scope of the trait. The documentation says nothing about how the developers were thinking or how the user should understand what was developed, instead it dives straight into the details.

Num traits seem to be such a fundamental and critical building block when writing generic structs and implementations. It also seems like there is value in adding num traits to other custom structs where the methods can be implemented. The problem is that I have no idea if this is correct. Is num-traits supposed to be used with generics, or is it not?

Could someone who understands the crate thoroughly add the following to the beginning of the documentation:

  1. The purpose of num-traits
  2. Scope of num-traits
  3. When not to use num-traits

I would love to write it, but I don't have the necessary information.