Kotlin is a statically-typed programming language primarily developed by the team of JetBrains that runs on the Java Virtual Machine and also can be compiled to JavaScript source code or uses the LLVM compiler infrastructure. It's a modern programming language.
Development lead Andrey Breslav has said that Kotlin is designed to be an industrial-strength object-oriented language, and a "better language" than Java, but still be fully interoperable with Java code, allowing companies to make a gradual migration from Java to Kotlin.
Kotlin can be adopted for both sides of development backend and front end. One of the obvious applications of Kotlin is Android development. Android has announced Kotlin as it's official language in Google I/O 2017.
Why I should adopt Kotlin :
Although Java is one of the world's most widely used programming languages and is pretty much the official language for Android development, there are many reasons why Java might not always be the best option for your Android projects. The biggest issue is that Java isn’t a modern language and although Java 8 was a huge step forward for the platform, introducing lots of features that developers had been waiting for (including lambda functions), at the time of writing Android only supports a subset of Java 8 features, and yes how can we forget null safety NullPointerException).
On other hands, Kotlin is a modern language providing all the feature of a modern language and even you can use your existing Java code to Kotlin and Kotlin code to Java. Interchangeability With Java makes us choose Kotlin over other modern programming languages. Kotlin eliminates most sources of null references by making all types non-nullable by default — meaning that the compiler won’t let you use a non-initialized, non-nullable variable. If you need a variable to hold a null value, you have to declare the type as nullable, adding a question mark after the type.
One of Kotlin’s main features is higher-order functions. If you’re familiar with JavaScript (or C# and many others), you probably already know all about these functions. A higher-order function takes functions as parameters or returns a function. One major use case for this is callback functions.
Kotlin aims to be an enhancement to Java, rather than a complete rewrite, so many of the skills you've acquired and honed throughout your Java career should still be applicable to your Kotlin projects.
At last, there is no programming language which is perfect it's also true for Kotlin :
Runtime Size : The Kotlin Standard Library and runtime will increase the size of your .apk. While this only equates to around 800KB, if your application is already on the large side then that extra 800KB may tip it over the edge and make users think twice before downloading your app.
Initial Readability : Although Kotlin’s concise syntax is one of the language's greatest strengths, you may initially find some Kotlin difficult to decipher, simply because there’s so much going on in such a small amount of code. Java may be more verbose, but the upside is that everything is clearly spelled out, which means unfamiliar Java code tends to be easier to decipher than unfamiliar Kotlin. Also, if used incorrectly, Kotlin’s operator overloading can result in code that’s difficult to read.
Official Support : Kotlin may have excellent support in Android Studio, but it’s worth remembering that Kotlin isn’t officially endorsed by Google. Also, Android Studio’s autocomplete and compilation tend to run slightly slower when you’re working with Kotlin, compared to a pure Java project.
Smaller Community and Less Available Help : As it's very new languages so Kotlin community is very small and very less help available on the internet.
You can find more info by visiting bellow links :
https://kotlinlang.org/docs
https://developer.android.com/kotlin/index.html
https://fabiomsr.github.io/from-java-to-kotlin/index.html
Development lead Andrey Breslav has said that Kotlin is designed to be an industrial-strength object-oriented language, and a "better language" than Java, but still be fully interoperable with Java code, allowing companies to make a gradual migration from Java to Kotlin.
Kotlin can be adopted for both sides of development backend and front end. One of the obvious applications of Kotlin is Android development. Android has announced Kotlin as it's official language in Google I/O 2017.
Why I should adopt Kotlin :
Although Java is one of the world's most widely used programming languages and is pretty much the official language for Android development, there are many reasons why Java might not always be the best option for your Android projects. The biggest issue is that Java isn’t a modern language and although Java 8 was a huge step forward for the platform, introducing lots of features that developers had been waiting for (including lambda functions), at the time of writing Android only supports a subset of Java 8 features, and yes how can we forget null safety NullPointerException).
On other hands, Kotlin is a modern language providing all the feature of a modern language and even you can use your existing Java code to Kotlin and Kotlin code to Java. Interchangeability With Java makes us choose Kotlin over other modern programming languages. Kotlin eliminates most sources of null references by making all types non-nullable by default — meaning that the compiler won’t let you use a non-initialized, non-nullable variable. If you need a variable to hold a null value, you have to declare the type as nullable, adding a question mark after the type.
One of Kotlin’s main features is higher-order functions. If you’re familiar with JavaScript (or C# and many others), you probably already know all about these functions. A higher-order function takes functions as parameters or returns a function. One major use case for this is callback functions.
Kotlin aims to be an enhancement to Java, rather than a complete rewrite, so many of the skills you've acquired and honed throughout your Java career should still be applicable to your Kotlin projects.
At last, there is no programming language which is perfect it's also true for Kotlin :
Runtime Size : The Kotlin Standard Library and runtime will increase the size of your .apk. While this only equates to around 800KB, if your application is already on the large side then that extra 800KB may tip it over the edge and make users think twice before downloading your app.
Initial Readability : Although Kotlin’s concise syntax is one of the language's greatest strengths, you may initially find some Kotlin difficult to decipher, simply because there’s so much going on in such a small amount of code. Java may be more verbose, but the upside is that everything is clearly spelled out, which means unfamiliar Java code tends to be easier to decipher than unfamiliar Kotlin. Also, if used incorrectly, Kotlin’s operator overloading can result in code that’s difficult to read.
Official Support : Kotlin may have excellent support in Android Studio, but it’s worth remembering that Kotlin isn’t officially endorsed by Google. Also, Android Studio’s autocomplete and compilation tend to run slightly slower when you’re working with Kotlin, compared to a pure Java project.
Smaller Community and Less Available Help : As it's very new languages so Kotlin community is very small and very less help available on the internet.
You can find more info by visiting bellow links :
https://kotlinlang.org/docs
https://developer.android.com/kotlin/index.html
https://fabiomsr.github.io/from-java-to-kotlin/index.html
Comments
Post a Comment