|
|
|
|
|
by mike_hearn
3886 days ago
|
|
Just to clarify, Kotlin doesn't have a collections library. What it does have is some clever compiler magic over JDK collections that adds: • Mutable vs immutable views (List is read only, MutableList is read/write) • Safer generics: map[key] which is translated to map.get() has the type bound you would expect rather than Java's much weaker Object type. • Lots and lots of extension functions to do things like functional programming with them However, behind the scenes they are still JDK collections, so you can call to and from existing Java with no problems and ... you know, actually, JDK collections library is pretty good. Especially once you get into the scalable concurrent collections. |
|