Closed hbina closed 4 years ago
Thank you for the PR! That looks huge, I'll need some time to review it more carefully.
Here are a couple notes from the brief look of it:
I'm hesitant about adding more non-core trait requirements to GenericInteger
(talking about One
and Zero
here).
It already has a lot and requiring more makes potential 3rd party implementations of this trait incompatible with the existing implementation. I wouldn't do that without convincing arguments, apart from mere refactoring.
I'm not sure if there are any performance/memory effects from swapping match
argument being a single ref to a couple (talking about match self
vs match (self, other)
). I'd like to have some simple benchmarking before we do this for readability’s sake
What do you think using this instead of nested if-else?