🚚 `Integer` - Name collision with Java
📝 Description
Problem: We've introduced the org.kotools.types.Integer type in #880 for representing an integer on JVM, JS and Native platforms. But on JVM, Java also provides the java.lang.Integer type for wrapping the primitive type int in an object. This degrades the developer experience in IDEs when typing the type's name provided by Kotools Types.
Solutions:
- Provide a type-alias on JVM platform. Candidates:
KTIntegerorKTInt(KT for Kotools Types, inspired from AppleNS*andCF*declarations). - Rename the
org.kotools.types.Integertype on JVM, JS and Native platforms. Candidates:BigIntegerorBigInt(suggested by @CLOVIS-AI respectively on Slack and here),KTIntegerorKTInt.
Workaround: Import the org.kotools.types.Integer type before using it.
import org.kotools.types.Integer
API:
package org.kotools.types
class Integer
Personally I'm in favor of BigInt. I think it's well established in most programming languages that fixed-sized numbers have a simple name and dynamic-sized numbers are prefixed with Big.
I originally proposed BigInteger for JVM similarity, but Kotlin just calls it Int so I think BigInt is better.
I honestly don't find the name "beautiful", I think LargeInt or DynamicInt sounds better. However, I know that if I go up to any software developer and say "Kotools type has a BigInt", 95% of them already know exactly what this is without any additional explanations.
Personally I'm in favor of
BigInt. I think it's well established in most programming languages that fixed-sized numbers have a simple name and dynamic-sized numbers are prefixed withBig.I originally proposed
BigIntegerfor JVM similarity, but Kotlin just calls itIntso I thinkBigIntis better.I honestly don't find the name "beautiful", I think
LargeIntorDynamicIntsounds better. However, I know that if I go up to any software developer and say "Kotools type has aBigInt", 95% of them already know exactly what this is without any additional explanations.
@CLOVIS-AI Thanks for your suggestion.
I agree on the fact that BigInt is a well established name in software programming.
On Kotlin/JS, no BigInt type is available in the IDE by default. But for web projects using Kotlin Wrappers, users will have a name collision with the provided BigInt type.
Still, I will add it to the candidates for this issue.