Why kotlin does not provide LinkedList implementation?

It does support it. When you are using KotlinJvm you can simply use javas LinkedList. On Js and Native I’m currently not aware of any LinkedList implementations. Looking through the issue list on https://youtrack.jetbrains.com/issues/KT I can’t find any current plans on implementing a LinkedList for the other platforms, so if you realy need it and you are using Kotlin MPP, Kotlin JS or K/N you probably need to implement it yourself (for now). I’d also suggest you create an issue (linke see above).

This is all a guess, but here it is: At the beginning there was only Kotlin JVM so there was no need to implement any List implementation since Kotlin just uses the java implementations. Later when Js was added I just don’t think there was a big focus on it. The fact that the issue tracker has nearly no mentions of LinkedList means that people just don’t really use it (or at least not on js/native). Compared with other List implementations LinkedList just has realy bad performance and get’s outperformed by ArrayList in nearly every situation, even used as a Dequeue.

1 Like