Another case of poor default order for Kotlin. No ...
# intellij
l
Another case of poor default order for Kotlin. No one ever: Let's take
RandomAccess
as a function parameter type. No Kotlin dev anymore: Let's use
java.util.Random
, way more relevant than
kotlin.Random
. There are a lot of discussions about writing idiomatic Kotlin, about going beyond writing Java in Kotlin. However, the IDE (Android Studio Koala, in my case), seems to want me to use Java APIs, even though there are obvious, better alternatives in Kotlin. Why
java.util
gets so much priority, and why isn't the IDE more Kotlin aware?
8
w
I don't know if it's the AI-powered completion ordering added a couple of releases ago or something else, but hard agree. Recently (and I mean for months now) autocompletion is only useful after typing 80% of the code anyway, and the suggestions never align with what I want (especially choosing between a named param, a variable, function call etc)
c
In 'File | Settings | Editor | General | Code Completion', you can enable "Mark position changes in the completion popup" which will display an indicator about which symbols the ML model thinks is more relevant than the base algorithm. It doesn't affect the default-selected option though.
Here's the result for me
r
This has been the case for years, also on Android Studio. Completely irrelevant/never used types show up until more than 3-4 characters are entered, even when there should be contextual information about the type.