-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Kotlin optimization #339
Comments
Well, I don't understand exactly what you're asking for here—note that I'm aware of Kotlin, but I have zero knowledge of the language... |
Well, I mean when you use this library in a Kotlin project, some frustrating conflicts will make the code more complicated. myMap.forEach { (key, value) ->
...something
} // key has type K and value has type V (Map.Entry<K,V>) ( If myMap.int2ObjectEntrySet().forEach { entry ->
val key = entry.intKey
val value = entry.value
...something
} So I hope the library can have built-in |
So to add that you would need public functions |
Yeah, but type-specified ones, like the |
Hmmm well that would pollute the autocompletion for all Java users. I think the better solution would be to provide a primitive variant of Not sure about your first point though, how they are conflicting ... these "conflicts" also exist in java, there they get resolved by type information. |
Example:
Example:
Object2LongMap.forEach
will produce entry with typejava.lang.Object
andjava.lang.Long
. AndMap.put(K, V)
, etc.Entry<K,V>.component1
/component2
One of the resolutions: PairExtensions.kt
I hope these stuffs could be library built-in ones, so Kotlin will give priority to existing member methods rather than extension functions
The text was updated successfully, but these errors were encountered: