本文共 1086 字,大约阅读时间需要 3 分钟。
Java 8 is a mature language and with more developers and a community to support its use in android development with great results and productivity and more developers are used to Java 8.
Kotlin is safe, concise, interoperable, tool friendly and comes with data classes and other useful features below which java 8 does not offer.“Kotlin has way, way more to offer than Java 8. Here is just a sampling (in no particular order)
Null-safety
Type inferenceString interpolationData classesDelegationSmart castsConditionals as expressionsSealed classesThe when expressionExtension functionsCo-routines in 1.1... and I'm sure I've just scratched the surface”-
“Comparison to Java Programming LanguageSome Java issues addressed in KotlinKotlin fixes a series of issues that Java suffers fromNull references are .Arrays in Kotlin are Kotlin has proper , as opposed to Java's SAM-conversions without wildcardsKotlin does not have checked
What Java has that Kotlin does not
that are not classesWhat Kotlin has that Java does not
+ = performant custom control structuresfootnotes:
转载地址:http://kyyba.baihongyu.com/