https://kotlinlang.org logo
#getting-started
Title
# getting-started
a

anlex N

03/26/2024, 6:07 AM
https://kotlinlang.org/docs/collections-overview.html#map Why is it designed in this way? what benefits? Thread in Slack Conversation
r

Ruckus

03/26/2024, 6:17 AM
This is for Java, but the same reasoning holds for Kotlin: https://stackoverflow.com/a/2651833
a

anlex N

03/26/2024, 6:25 AM
so you can not say it's a Kotlin collection type as well. please update docs.
r

Ruckus

03/26/2024, 6:30 AM
It is a "collection type" in the everyday sense, it's just not a
Collection
in the API sense. The distinction is a bit arbitrary unfortunately, but it's a legacy that has been that way on the JVM for decades, so it's a bit too late to change.
a

anlex N

03/26/2024, 6:38 AM
so crazy. That's not how innovation works. I think Java have been corrupt, have no little innovation in many years.
r

Ruckus

03/26/2024, 6:45 AM
Innovation doesn't mean there's no legacy. And I would counter Java has had a significant amount of innovation in recent years, and there's more coming down the pipe all the time. Look through recent release notes to see all the features and enhancements that have been added, and check out some of the things currently being tested and prototyped for future versions.
Regardless of your feelings toward Java, Kotlin still needs to hold true to its promise to be 100% compatible with Java, which does mean inheriting some of its legacy.
👍 1
a

anlex N

03/26/2024, 8:21 AM
r

Ruckus

03/26/2024, 2:41 PM
I have nothing to add to that thread