Memory Management - ARC with Cycle Collector - When working pure Kotlin,don’t worry about memory management - Weak references supported - Memory sharing model - Different threads have disjoint object graphs - Object subgraphs can be transferred between threads - Immutable objects can be shared
Interoperatibility - Interoperatibility with C, Objective-C and Swift - Kotlin can call C/Objective-C and vice-versa - Kotlin can extend Objective-C classes and vice-versa - Memory management aware of Objective-C runtime
Mapping - Numbers are kept - Strings converted - Kotlin declarations wrapping C entities (functions, struct, unions, etc.) are auto- generated - Objective-C OO concepts (classes, protocols, blocks) are represented as matching Kotlin entities (classes interfaces, lambdas) - For Objective-C, Kotlin code can be compiled to a framework
Kotlin Library - Hold collection of code for reusability and sharing - Own format: ‘klib’ extension, which holds metadata and bitcode - Tool for creating and storing libraries in repositories
The future Hard to make predictions, easier to bet safe “I don’t know what will happen in 10 years, but there will be people asking in SO about regular expressions, and there will be another JS framework ”