You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if types like big.Int worked out of the box.
big.Int doesn't provide Equal method. It has Cmp though.
I don't know how common types with Cmp but no Equal are. If they're common then we could consider teaching cmp about Cmp methods. If they're not then perhaps we could make math/big provide Equal methods.
In general, it would be nice if cmp just worked with as many stdlib types as possible.
Having simple cmp.Equal work with more types would be nice but isn't a big deal either.
The text was updated successfully, but these errors were encountered:
At this point in time, I don't think we can change which methods cmp automatically looks for without breaking backwards compatibility. The workaround is to just provide a Comparer that works on an interface{ Cmp() int }.
It would be nice if types like big.Int worked out of the box.
big.Int doesn't provide Equal method. It has Cmp though.
I don't know how common types with Cmp but no Equal are. If they're common then we could consider teaching cmp about Cmp methods. If they're not then perhaps we could make math/big provide Equal methods.
In general, it would be nice if cmp just worked with as many stdlib types as possible.
Having simple cmp.Equal work with more types would be nice but isn't a big deal either.
The text was updated successfully, but these errors were encountered: