Hi,
First of all, great work! It is a pleasure working the library.
I realized that Int's interface is immutable, except for the following method (big.Int is mutable):
// BigInt returns the value as a big.Int.
// The returned variable must not be modified by the client.
func (i Int) BigInt() *big.Int {
...
}
Is that for a reason? I see the method is used internally in several places. I would imagine it is better to split it in 2:
BigInt() -> public method, returns a copy of the BigInt to maintain the immutability properties
bigInt() -> internal, returning directly the reference to the big.Int. Not sure if the naming I propose would be best, other ideas could be ptrInt(), internalBigInt(), bint(), ...
If this is something that would be approved, I can work on the change and send a pull request.
Hi, First of all, great work! It is a pleasure working the library. I realized that Int's interface is immutable, except for the following method (big.Int is mutable):
Is that for a reason? I see the method is used internally in several places. I would imagine it is better to split it in 2:
If this is something that would be approved, I can work on the change and send a pull request.
Best, Germán