Closed sergeych closed 2 years ago
You can do it also nu including something like:
fun BigInteger(text: String): BigInteger = BigInteger.parseString(text)
in your distribution
Hi @sergeych,
it is a compatibility issue
Could you expand on what is it that this library is expected to be compatible with?
Also, I could not build the project from sources as serialization dependency is missing.
The automated builds were successful, and the serialization is kotlinx-serialization version 1.3.1 which is published by jetbrains, could you please share the logs you are seeing?
Closed by accident, apologies for noise.
compatibility with Java's BigInteger. I've started to port massive portions of our code to your multiplaform solutions and found it is a little different, while it could be almost a drop in replacement for java BigInteger. Why did you mark it invalid? You suppose source-compatibility with java's biginteger/bigdecimal is invalid?
I think I marked it as invalid because BigNumber is an interface so it cant have constructors.
Oh, I see it now. Thanks for clarifying.
It is not just a convenient feature, it is a compatibility issue. The current set of constructors do not let effectively add one, as there is 2 parameters that should come out from parse function at once. So I;d recommend introduce data class like BigNumber.CreationParams(arighmetic,sign) and whatever else might be useful in future, making addition of the string parsing constructor relatively easy by simple refactoring parseString() code to provide such creation params first. Also, I could not build the project from sources as serialization dependency is missing. Thanks in advance.