num-traits icon indicating copy to clipboard operation
num-traits copied to clipboard

Why not `checked_pow` as a trait method

Open lemunozm opened this issue 2 years ago • 1 comments

Hi!

This is only a design question about the current implementation of checked_pow as a function. Why is it implemented as a function instead of using a trait method as the rest of the checked operations?

I'm implementing a wrapper over these functions, and I want to know if you found some issues that forced you to implement it as a plain function.

Thanks!

lemunozm avatar Jan 09 '23 14:01 lemunozm

I think that's just historical -- it was added way back in rust-num/num#162, when pow was also still only a function, not yet a trait.

cuviper avatar Feb 10 '23 21:02 cuviper