News

Kotlin 1.4 Release Emphasizes Quality, Performance, and Fun

The latest release of the Kotlin programming language, v1.4.0, is now generally available. This release emphasized performance and tooling, and includes the long-awaited SAM (single abstract method) conversions for Kotlin interfaces.

"Over the past years, we've been working hard on making Kotlin a programming language that is fun, enjoyable, and productive to work with," said Svetlana Isakova in a blog post. "To continue our pursuit of this goal with this version of Kotlin, we put a lot of energy and effort into improving the performance and quality of Kotlin and its tooling."

More than 5.8 million contributors edited Kotlin code in the last 12 months, said Isakova, who is a developer advocate at JetBrains, creator of the language, and co-author of Kotlin in Action, and the numbers continue to grow. JetBrains counts more than 200 user groups, worldwide.

This release includes fixes for more than 60 performance issues, including many that were causing IDE freezes or memory leaks.

This release introduces the new the Coroutine Debugger and a new, flexible Kotlin Project Wizard, which provides a single place for developers to create and configure Kotlin projects of different types. And more than 40 new quick-fixes, intentions, and inspections have been added to this release.

This release also comes with several parts of a new compiler, which JetBrains describes as an "ongoing effort" that looks to be under construction for a few more releases. A new, more powerful type inference algorithm is enabled by default in this release. It infers types automatically in more use-cases, supports smart casts even in complicated scenarios, and improves inference for delegated properties. New JVM and JS backends are available in Alpha mode in this release. Once stabilized, they will become the new default, JetBrains says.

"Performance improvements are an ongoing process," Isakova said, "and we have many more enhancements planned, like continuing to work on eliminating freezing and making typing smoother. We've already started integration with the new experimental Kotlin compiler frontend that will make the IDE a lot faster. This is a huge task that requires many parts of the plugin to be rewritten, but it will boost performance in many areas of the IDE, including code completion, syntax highlighting, and compiler error reporting."

The list of language features and improvements in this release includes the much anticipated SAM conversions for Kotlin interfaces. Prior to this release, Kotlin developers could apply SAM conversions only when working with Java methods and Java interfaces from Kotlin. Going forward, SAM conversions for Kotlin interfaces can be used, as well.

 

Detailed descriptions of new features on the Kotlin 1.4 release, as well as information about migrating to Kotlin 1.4. are available on the What's New page.

Kotlin ranked 13th among the most popular languages for professional developers in the StackOverflow Developer Survey 2020, and it cracked the Top 20 in the most recent RedMonk Programming Language Rankings. The Kotlin developer community claims that more than 30,000 members are exchanging "knowledge and support" on Slack and Reddit, and the official Twitter account has more than 90,000 followers.

Created by JetBrains, the Prague-based maker of the venerable code-centric Java IDE, IntelliJ IDEA, Kotlin is a statically typed language similar to Scala, Gosu, Ceylon, and Fantom, which compiles to both JVM byte code and JavaScript. JetBrains has claimed that Kotlin is more stable at runtime than Java, because it can statically check weak points and supports things like variable type interface, closures, extension functions, and mix-ins. It's also less verbose than Java, which means devs can write less code with a more readable syntax.

JetBrains unveiled Kotlin at the 2011 JVM Language Summit in Santa Clara, CA, and later released it for distribution under the Apache 2 Open Source License.

About the Author

John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS.  He can be reached at [email protected].