Rust and numeric computation

I'm mostly waiting for #[sealed] to get an initial implementation, but a while back I posted a pre-RFC here on irlo for core::primitive::Int and core::primitive::Float sealed traits defined as "the functionality macro pasted across the different primitive types." I'm still interested in doing so, and it's a decent first push into this while remaining fairly -evident in the provided functionality, thus hopefully less complicated than the generality of num, alga, or simba.

(funty is another alternative which is deliberately limited to the primitive types similar to this.)

Everyone would love extending literals with the trait system, but IIUC it's blocked on better fallback/inference behavior, which is blocked on the new trait resolver work. (I usually see it discussed with i__ and f__ types as a bit of cute visual abstraction over the concrete types.)

5 Likes