- KMM: Kotlin Multi platform for Mobile
- New front ends and backends
- Enable data sharing in IntelliJ
- Answer questions on SO
- Interfaces can be fun now! SAM conversion, but explicit
- Explicit API Mode: Errors/Warnings enforcing explicit visibility and return types (for libraries, preventing accidental exposure/breakage)
- Trailing, commas,
- But don't be tempted to just swap argument lines, use IDE refactoring to properly handle usages!
- continue and break allowed now in when inside loops
- named and positional args can now be mixed!
- but take care to maintain the order!
- Better type inference!
// 1.3 -> result: String! // 1.4 -> result: String val result = run { var str = getNullableString() if (str == null) { str = "test" } str }
- References with default args!
fun foo(i: Int = 0): String = "$i!" fun apply(f: () -> String): String = f() apply(foo) // 0!
- KotlinNullPointerException (!!), TypeCastException (as Type), IllegalStateException (platform-type expression), IllegalArgumentException(parameter) -> NullPointerException
- @JvmDefault no longer required for using java 8's interface default methods
- Speeeeeeeedddddd!!!!!
- make sure to update intellij
- Kotlin plugin is becoming a part of intelliJ !!!
- That means features like chain intermediate return types etc. can come together for Java & Kotlin!!
- interop will continue for new Java versions
- How things get decided: Slack/Forums, Comm with big users, YouTrack, Keep
- Feature propagation: Ideas/Proposals: YouTrack #{language design} -> Design document: KEEP -> Corrections/improvements: KEEP Issues
- Vote for KT-14663 :p (different type for different visibility for properties)
- More stuff:
- Namespaces & extensions
- multiple receivers & decorators
- public/private property types
- ternary operators (
bool ? true : false
syntax declined) - immutability & inline classes