Kotlin, the popular programming language, has over 117 thousand apps that have been leveraging Kotlin and the total number of downloads are over 240 billion.
Does one need any more statistics to prove its increasing worth?
Kotlin is an open-source, statistically typed, and general-purpose programming language created by JetBrains. It is now officially endorsed language by Google for Android App development. It is completely interoperable with Java and primarily aims for JVM. Google, Pinterest, Square, Tinder, Airbnb are some of the many top apps built with Kotlin. It has great community support and is open to community feedback.
Kotlin Multiplatform is concentrating on leveraging Kotlin’s cross-platform app development abilities by providing the same code for various platforms. Kotlin Multiplatform Mobile (KMM) is an SDK for cross-platform mobile development that permits developers to use the same business logic code in iOS and Android applications. It consists of different tools and features to make the entire application development process effective and robust.
Continuing the success journey, Kotlin recently came up with its latest release – Kotlin 1.4.20 on November 23, 2020, stuffed up especially for its KMM users, with newer JVM features, enhanced performance, exception handling, and extensions for JDK Path.
Kotlin 1.4.20 – Key Features And Attractions
Kotlin carries out 3 types of releases – Feature release (1.x), Incremental release (1.x.y), and Bugfix release (1.x.yz). The current one falls under the third category – it is an incremental release with the following features embedded:
Enhanced Performance And Exception Handling for KMM Projects:
The newer version of Kotlin has all its eyes on the Kotlin Multiplatform Mobile users. All its new features are targeted towards offering the best of features to its KMM users. Features like increased performance parameters and better exception handling are the ones that take a priority when it comes to making its users happy and satisfied.
Since they have great community support, it becomes easy to get genuine feedback regarding the updates and how effective they are.
Kotlin With JVM:
There has been an addition of the novel JVM 15 target on the Java Virtual Machine that emphasizes on enhancing the current functionalities and performance, along with repairing errors. This includes assistance for newer JVM features like string concatenation through invokedynamic.
Invokedynamic string concatenation – For an augmented performance, this version of Kotlin now implements the dynamic method invocation that occupies lesser memory and offers arenas for better working.
Kotlin With JS:
The current release of Kotlin includes technical upgrades like updates in the Gradle DSL to streamline project setup, selective yarn dependency resolutions, disabling granular workspaces, effective wizard templates – Browser application, React application and NodeJS application, ignoring compilation errors. Some of these features are yet in the experimental stage and hence will be refined based on community inputs.
Kotlin With Native:
One of the prime areas of focus in this version is the performance criteria. There is the inclusion of a new feature – a prototype of the newer escape analysis system. This feature is about to be refined and enhanced in upcoming versions. Some other features that are included in this version are bug fixation and polishing, escape analysis, opt-in wrapping of Objective-C exceptions during runtime to prevent breakdowns, CocoaPods plug-in enhancements, revised integration with Xcode via some Podfile updates, extended support for Xcode 12 libraries.
The enhancements in CocoaPods plug-in focus on rebuilding dependencies only when needed, competence to append dependency on library from various sources like customer spec repository, etc.
Newer Features In Multiplatform Library Publication:
Earlier, multiplatform library publications were never utilized clearly because there was no need for dependency on the metadata publication completely though it did include platform-related publication and a metadata publication too. This version does not have a separate metadata publication. It is now a part of the root publication which is automatically operated.
There is compatibility with libraries published in this version – if there is a need to use such a library, users will have to upgrade Kotlin to this version. In case the users do not enable hierarchical project structure support, they will be able to use the earlier versions with the library.
There are certain standardized library changes that have been effective with this version of Kotlin. Experimental extensions for java.nio.file.Path, no need to call static methods of Files, availability of extensions in kotlin-stdlib-jdk7 module, enhanced performance of the String.replace function with variations suggested by the Kotlin community members.
Kotlin Android Extension Plug-in Has Been Deplored:
The Kotlin Android Extensions have had an important role in enhancing the popularity of Kotlin in the Android world. These extensions helped developers with effective tools to lessen boilerplate code – synthetic views and Parcelable implementation generator.
The new version has the Parcelable implementation generator extracted with a deprecation cycle for the remaining portion of syntetics. This is available in the new kotlin-parcelize plug-in and must be applied instead of the kotlin-android-extensions.
On A Wrapping Note:
As Kotlin loyalists, developers are going to enjoy using these new features and as per Kotlin’s open policy, they are free to give their opinion on the features and their execution. Android Studio will suggest an automated update to Kotlin 1.4.20. It can also be done manually!