KotlinConf ‘24 Highlights Summary Build with Gemini

kotlinconf-‘24-highlights-summary-build-with-gemini
https://blog.jetbrains.com/kotlin/2024/05/kotlin-roundup-kotlinconf-2024-keynote-highlights/

Google Gemini generated this summary using the Flash Gemini 1.5 model.

KotlinConf Keynote Highlights:

  • Hadi Hariri, VP of Developer Advocacy @JetBrains: Welcomes attendees to KotlinConf, highlighting the growing community with 2000 in-person attendees and global online participation. He encourages attendees to engage with sponsors and explore the multi-platform KotlinConf app.
  • Egor Tolstoy, Kotlin Project Lead @JetBrains: Announces the release of Kotlin 2.0, emphasizing its significant performance boost, robustness, and speed. He discusses the new compiler’s advancements, the upcoming Beta release of the IntelliJ Kotlin plugin K2 mode, and the 2x faster compilation speed for JVM projects.
  • Eva Matthaey, Software Engineer in Meta: Shares Meta’s adoption of Kotlin for Android development, showcasing their progress from Kotlin’s first to 20 million lines of Kotlin code. He highlights the benefits of Kotlin adoption: reliability, conciseness, and a 10% reduction in lines of code.
  • Jeffrey Van Gogh, an Android engineer from Google: shares Google’s commitment to Kotlin, emphasizing its use of K2 and Buck2 in its builds. He discusses the 20% better Android compilation speeds and the successful rollout of K2 across their tech stack. He highlights Google Workspace’s use of Kotlin Multiplatform to share business logic across various platforms.
  • Sebastian Aigner — Developer Advocate and Ekaterina Petrova – Product Marketing Manager @JetBrains: Explains the team’s work on making Jetpack Compose more robust and the upcoming features in the July release. He discusses the efforts made to improve Compose’s performance and the availability of Kotlin 2.0 as an early preview in Android Studio Canary. JetBrains is committed to making Kotlin 2.0 a robust foundation for all types of applications. They’ve been working hard to make Android development fully compatible with Kotlin 2.0, porting tools like Android Lint and the Compose compiler plugin. Recognizing that keeping the Compose compiler plugin up-to-date with new compiler releases was challenging, they’ve moved the plugin into the compiler repo. This means developers no longer need to worry about version mismatches or waiting for plugin updates. JetBrains is continuously improving Jetpack Compose, adding highly requested features and focusing on making it as performant as possible. They’ve achieved a 20% faster recompilation in their benchmarks. JetBrains is working to expand KMP support to include more platforms, including iOS, macOS, Linux, and Windows. This will allow developers to share business logic across a wider range of platforms. In addition, JetBrains AI assistant, written entirely in Kotlin, is a powerful tool that offers code completion, refactoring, and code understanding for both Kotlin and Swift. It’s designed to make development more efficient and enjoyable.
  • Michail Zaecenskij @JetBrains: Michail continues the presentation by exploring the upcoming language features, particularly focusing on guarded conditions, which are set to be released in Kotlin 2.1.
  • Julie Gunderson, AWS: Shares Amazon’s use of Kotlin, including their extensive use of Smithy, a Kotlin generator, for their services. She also discusses the use of the AWS SDK for Kotlin and the ongoing efforts to improve the SDK and its integration with the ecosystem.
  • Svetlana Isakova, Developer Advocate @JetBrains: Introduces JetBrains AI assistant, a tool written entirely in Kotlin that enables code generation, refactoring, and code understanding. She provides examples of how JetBrains AI assistant can help developers, including generating session routing code.
  • Overall, the video highlights the progress and continued evolution of Kotlin, with emphasis on the adoption and development of Kotlin Multiplatform (KMP) and JetBrains’s AI assistant. The video also showcases Google and Amazon’s significant investments in Kotlin, underscoring its growing popularity and the exciting future for the language.

Another talk was mainly about the features of the Kotlin language in 2.0 and beyond for Michail Zarečenskij.

The video starts with a brief history of Kotlin and its evolution since 1.0. It then discusses the reasons for the new Kotlin compiler, which include:

  • Some language features have appeared unexpectedly in Kotlin, making it hard to maintain and evolve the compiler.
  • Interaction with compiler plugins and IDEs has become complex, with many ad-hoc solutions, no strict contracts, and no stable API.
  • Compilation time performance has become a concern.

The video then dives into the key changes in Kotlin 2.0, including:

  • Frontend Intermediate Representation (FIR): This is a transformative change that breaks down complex language constructs into simpler ones, making it easier to analyze and maintain.
  • Phased approach for analysis: This allows for isolated phases for particular language constructs, making it easier to extend the compiler and IDE plugins.
  • New control flow engine: This engine is designed to offer more sophisticated analysis of code execution paths, leading to better prediction and detection of unreachable code, potential bugs, and other issues.

The video also discusses some of the future plans for Kotlin, including:

  • Context-sensitive resolution: This will allow for more efficient and accurate resolution of types and other language constructs.
  • Generalized ADTs: This will provide a more powerful and flexible way to define data types.
  • Explicit backing fields: This will allow developers to have more control over the representation of data classes.
  • Union types: This will allow for more flexible and expressive type systems.

Here are some Kotlin code examples from the video:

This code snippet shows an example of a simple function that increments the first element of a mutable list of longs. In Kotlin 1.x, this code would result in an error because the compiler could not combine the operator calls and numeric conversions.

fun f(mlist: MutableList) {
mlist[0] = mlist[0] + 1 // Error in Kotlin 1.x
}

This code snippet shows the same function, but written in Kotlin 2.0. The compiler can now correctly combine the operator calls and numeric conversions, making the code more concise and readable.

fun f(mlist: MutableList) {
mlist[0] += 1 // OK in 2.0
}

Smart casts inside closures: Previously, smart casts were not always available inside closures. This has been fixed in Kotlin 2.0, so smart casts can now be used in more cases.

fun foo(x: Any) {
if (x is String) {
println(x.length) // Smart cast is now available here
}
}

Smart casts after logical operators: Previously, smart casts were not always available after logical operators like || and &&. This has been fixed in Kotlin 2.0, so smart casts can now be used in more cases.

fun foo(x: Any) {
if (x is String && x.length > 0) {
println(x.toUpperCase()) // Smart cast is now available here
}
}

Smart casts after when statements: Previously, smart casts were not always available after when statements. This has been fixed in Kotlin 2.0, so smart casts can now be used in more cases.

fun foo(x: Any) {
when (x) {
is String -> println(x.length) // Smart cast is now available here
else -> println("Not a string")
}
}

If you want to learn more new things about Kotlin 2.0, I leave you some links.

I hope this information is useful to you and remember to share this blog post, your comment is always welcome.

Visit my social networks:

More Info

KotlinConf’24 – Keynote

https://medium.com/media/8500d13655a88655c8630486c7afe5f8/href


KotlinConf ‘24 Highlights Summary Build with Gemini was originally published in Google Developer Experts on Medium, where people are continuing the conversation by highlighting and responding to this story.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
how-to-build-an-ai-chatbot-with-python-and-gemini-api:-comprehensive-guide

How to Build an AI Chatbot with Python and Gemini API: Comprehensive Guide

Next Post
this-newsletter-growth-trend-is-straight-from-wall-street

This Newsletter Growth Trend Is Straight from Wall Street

Related Posts