# kotlin 2

Published articles for kotlin 2.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Kotlin 2.4 Brings Swift-Style Collection Syntax \[\]

DevFeed: [Kotlin 2.4 Brings Swift-Style Collection Syntax \[\]](<https://devfeed.tech/articles/kotlin-2-4-brings-swift-style-collection-syntax-25983.md>)

Original publisher: [Read original article](<https://proandroiddev.com/kotlin-2-4-brings-swift-style-collection-syntax-0ab7097aa166?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-06-04T16:32:23Z

Content type: article

Language: en

Sources: [Stories by Nav Singh 🇨🇦 on Medium](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [Code](<https://devfeed.tech/topics/code.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [collection](<https://devfeed.tech/tags/collection.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [kotlin-standard-library](<https://devfeed.tech/tags/kotlin-standard-library.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

This article explains Kotlin 2.4's experimental collection literals, which allow collections to be initialized with bracket syntax instead of functions such as listOf() or mutableListOf(). It also covers enabling the feature with the compiler option and discusses explicit declarations and type inference.

### Source excerpt

Image generated using Perplexity In Kotlin 2.4, collection literals are introduced, making collection initialization more concise and readable. To define collections, we no longer need to use functions like listOf() or mutableListOf(). This reduces boilerplate and makes intent clearer at a glance, especially when working with simple, static data. It's currently an experimental feature. We need to opt in, and the syntax or behavior may evolve in future releases. Add the Xcollection-literals compiler option to the build file kotlin { jvmToolchain(21) compilerOptions { freeCompilerArgs.add("-Xcollection-literals") } }Code samples Bracket syntax [] + explicit declaration // Mutable list with explicit type declaration // val plFNames: MutableList<String> = mutableListOf("Joe", "Alice") // Mutable list with brackets syntax val plFNames: MutableList<String> = ["Joe", "Alice"] println(plFNames) // ["Joe", "Alice" ] Bracket syntax [] + type inference As per docs:Compiler defaults to List if it lacks sufficient information to infer the collection type.But it seems like Array as we can see in the screenshot 📸 👇 val plFNames = ["Joe", "Alice"] println(plFNames) // ["Joe", "Alice" ]Screenshot type inference -- typeReferences What's new in Kotlin 2.4.0 | Kotlin Kotlin 2.4 Brings Swift-Style Collection Syntax [] was originally published in ProAndroidDev on Medium, where people are continuing the conversation by highlighting and responding to this story.

## Simplify Sorted-Order Validation with Kotlin 2.4.0's New Extensions

DevFeed: [Simplify Sorted-Order Validation with Kotlin 2.4.0's New Extensions](<https://devfeed.tech/articles/simplify-sorted-order-validation-with-kotlin-2-4-0-s-new-extensions-25978.md>)

Original publisher: [Read original article](<https://navczydev.medium.com/simplify-sorted-order-validation-with-kotlin-2-4-0s-new-extensions-b48b1ac10521?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-04-06T02:23:40Z

Content type: tutorial

Language: en

Sources: [Stories by Nav Singh 🇨🇦 on Medium](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [extension](<https://devfeed.tech/tags/extension.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [kotlin-beginners](<https://devfeed.tech/tags/kotlin-beginners.md>), [kotlin-standard-library](<https://devfeed.tech/tags/kotlin-standard-library.md>), [library](<https://devfeed.tech/tags/library.md>), [sortedlist](<https://devfeed.tech/tags/sortedlist.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

This article introduces Kotlin 2.4.0-Beta1 standard-library extension functions for checking whether collections are sorted. It covers ascending, descending, comparator-based, and selector-based checks, which return true for correctly ordered collections or collections with fewer than two elements. The checks stop when they find an unordered pair.

### Source excerpt

Image generated using Perplexity Kotlin 2.4.0-Beta1 introduces a small but powerful addition to the standard library: a set of new extension functions that lets us check whether a collection is already sorted. With these extension functions, we can check whether elements have already been sorted without resorting them. New Functions .isSorted() .isSortedDescending() .isSortedWith(comparator) .isSortedBy(selector) .isSortedByDescending(selector) All of these return true if: The elements are in the expected order, or The collection has fewer than two elements.These functions are optimized -- they stop checking as soon as an unordered pair is found, so they handle large inputs efficiently.Code samplesdata class User(val name: String, val age: Int)fun main() { val numbers = listOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) println("Numbers: isSorted") println(numbers.isSorted()) // true println("Is sorted descending") println(numbers.isSortedDescending()) // false // Users list val users = listOf( User("Alice", 21), User("Balley", 34), User("Charles", 29), ) println("Users: isSorted by Age") println(users.isSortedBy(User::age)) // false val comparator = Comparator<User>{ user, user2 -> user.name.length.compareTo(user2.name.length) } println("Users: isSortedWith(comparator)") val sortedList = users.sortedWith(comparator) println("Users: Name by length ${sortedList.joinToString()}") // Output: Users: Name by length User(name=Bob, age=31), User(name=Alice, age=24), User(name=Charlie, age=29) println(sortedList.isSortedWith(comparator)) // true }References What's new in Kotlin 2.4.0-Beta1 | Kotlin

## Beyond Positions: Kotlin's New Name-Based Destructuring

DevFeed: [Beyond Positions: Kotlin's New Name-Based Destructuring](<https://devfeed.tech/articles/beyond-positions-kotlin-s-new-name-based-destructuring-25979.md>)

Original publisher: [Read original article](<https://proandroiddev.com/beyond-positions-kotlins-new-name-based-destructuring-eee347d1bb5c?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-03-18T01:24:50Z

Content type: tutorial

Language: en

Sources: [Stories by Nav Singh 🇨🇦 on Medium](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [properties](<https://devfeed.tech/topics/properties.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [data-class](<https://devfeed.tech/tags/data-class.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [properties](<https://devfeed.tech/tags/properties.md>)

### AI overview

This tutorial explains Kotlin 2.3.20's experimental name-based destructuring declarations, which match variables to properties instead of relying on componentN() position. It also covers the compiler option and supported modes.

### Source excerpt

Image generated using Perplexity Name-based destructuring declarations were introduced in Kotlin 2.3.20 and match variables to properties rather than relying on position-based componentN(). Previously, destructive declarations used position-based destruction: data class User(var firstName: String, var lastName: String) val user = User("Alice", "Husseini") // componentN() val(firstName,lastName) = user println(firstName) println(lastName)Drawback of the componentN() based approach Destructuring relies on the order of componentN() functions, lastName receives the value of firstName, and firstName receives the value of lastName 👇 data class User(var firstName: String, var lastName: String) val user = User("Alice", "Husseini") // componentN() val(lastName,firstName) = user println(firstName) -> Husseini println(lastName) -> AliceName-based destructuring ✨ It's an Experimental feature. We can control how the compiler interprets destructuring declarations with the -Xname-based-destructuring compiler option. kotlin { // .. compilerOptions { freeCompilerArgs.add("-Xname-based-destructuring=only-syntax") } }Each variable refers to a property by name.val user = User("Alice", "Husseini") // Name-based destructuring (val firstName = firstName, val lastName = lastName) = userModeshttps://kotlinlang.org/docs/whatsnew2320.html#languageMode -- Name-Mismatch⚠ Warning ⚠Name-Mismatch warningMode -- Complete Position-based destructuring using square brackets []: data class User(var firstName: String, var lastName: String) val user = User("Alice", "Husseini") // componentN() val [firstName,lastName] = userReferences What's new in Kotlin 2.3.20 | Kotlin Stay in touch https://www.linkedin.com/in/navczydev/ JavaScript is not available. navczydev - Overview navczydev.bsky.social Beyond Positions: Kotlin's New Name-Based Destructuring was originally published in ProAndroidDev on Medium, where people are continuing the conversation by highlighting and responding to this story.

## jOOQ 3.20 released with ClickHouse, Databricks, and much more DuckDB support, new modules, Oracle type hierarchies, more spatial support, decfloat and synonym support, hidden columns, Scala 3, Kotlin 2, and much more

DevFeed: [jOOQ 3.20 released with ClickHouse, Databricks, and much more DuckDB support, new modules, Oracle type hierarchies, more spatial support, decfloat and synonym support, hidden columns, Scala 3, Kotlin 2, and much more](<https://devfeed.tech/articles/jooq-3-20-released-with-clickhouse-databricks-and-much-more-duckdb-support-new-modules-oracle-type-hierarchies-more-spatial-support-decfloat-and-synonym-support-hidden-co-28953.md>)

Original publisher: [Read original article](<https://blog.jooq.org/jooq-3-20-released-with-clickhouse-databricks-and-much-more-duckdb-support-new-modules-oracle-type-hierarchies-more-spatial-support-decfloat-and-synonym-support-hidden-columns-scala-3-kotlin/>)

Author: lukaseder

Published: 2025-02-20T10:27:54Z

Content type: release

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [databricks](<https://devfeed.tech/topics/databricks.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Oracle Database](<https://devfeed.tech/topics/oracle-database.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [jpa](<https://devfeed.tech/topics/jpa.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [databricks](<https://devfeed.tech/tags/databricks.md>), [decfloat](<https://devfeed.tech/tags/decfloat.md>), [dirty-tracking](<https://devfeed.tech/tags/dirty-tracking.md>), [dml-join](<https://devfeed.tech/tags/dml-join.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [hidden-columns](<https://devfeed.tech/tags/hidden-columns.md>), [jdk-21](<https://devfeed.tech/tags/jdk-21.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-20](<https://devfeed.tech/tags/jooq-3-20.md>), [jooq-development](<https://devfeed.tech/tags/jooq-development.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [json](<https://devfeed.tech/tags/json.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [merge](<https://devfeed.tech/tags/merge.md>), [modules](<https://devfeed.tech/tags/modules.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [oracle-plsql-types](<https://devfeed.tech/tags/oracle-plsql-types.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [scala](<https://devfeed.tech/tags/scala.md>), [scala-3](<https://devfeed.tech/tags/scala-3.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [spatial](<https://devfeed.tech/tags/spatial.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

jOOQ 3.20 introduces experimental ClickHouse and Databricks SQL dialects, improves DuckDB support, adds new integration modules, and expands support for Oracle type hierarchies, spatial features, decfloat, synonyms, hidden columns, Scala 3, and Kotlin 2.

### Source excerpt

New dialects: jOOQ 3.20 ships with 2 new experimental dialects: ClickHouse is a fast-moving SQL dialect with a historic vendor-specific syntax that is gradually migrated to a more standards compliant alternative, which is why our support is still experimental. A lot of behaviours differ from what one would expect elsewhere, including NULL handling, which is ... Continue reading jOOQ 3.20 released with ClickHouse, Databricks, and much more DuckDB support, new modules, Oracle type hierarchies, more spatial support, decfloat and synonym support, hidden columns, Scala 3, Kotlin 2, and much more ->

## Xcode-Kotlin 2.0 Release - Tadeas Kriz

DevFeed: [Xcode-Kotlin 2.0 Release - Tadeas Kriz](<https://devfeed.tech/articles/xcode-kotlin-2-0-release-tadeas-kriz-38350.md>)

Original publisher: [Read original article](<https://touchlab.co/xcode-kotlin-2-0>)

Published: 2024-07-16T00:00:00Z

Content type: release

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [release](<https://devfeed.tech/tags/release.md>), [swift](<https://devfeed.tech/tags/swift.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

xcode-kotlin 2.0 is released with improved Kotlin Multiplatform debugging in Xcode, including faster frame-variable resolution, expanded variable information, support for Swift, Kotlin, and Objective-C code, and additional type handling.

### Source excerpt

Huge improvement to Kotlin Multiplatform debugging in Xcode.

## Upgrading a Kotlin and PicoCLI Project to Kotlin 2.0

DevFeed: [Upgrading a Kotlin and PicoCLI Project to Kotlin 2.0](<https://devfeed.tech/articles/celebrating-kotlin-2-0-38823.md>)

Original publisher: [Read original article](<https://lengrand.fr/celebrating-kotlin-2-0/>)

Author: Julien

Published: 2024-05-22T22:22:53Z

Content type: tutorial

Language: en

Sources: [Thoughts, stories and ideas.](<https://devfeed.tech/sources/thoughts-stories-and-ideas.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [upgrade](<https://devfeed.tech/topics/upgrade.md>), [version](<https://devfeed.tech/topics/version.md>)

Tags: [2-0-0](<https://devfeed.tech/tags/2-0-0.md>), [cli](<https://devfeed.tech/tags/cli.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>)

### AI overview

The article documents upgrading a simple Kotlin and PicoCLI command-line project from Kotlin 1.4.10 to Kotlin 2.0. The build succeeds after updating the plugin and adjusting deprecated target configuration; the kapt plugin falls back to Kotlin 1.9, so it is commented out for the project to run on Kotlin 2.0.

### Source excerpt

Upgrading a simple Kotlin and PicoCLI project to Kotlin 2.0 in under 5 minutes to celebrate the new version coming up!

## Kotlin for Developers series is updated to Kotlin 1.9 and ready for 2.0

DevFeed: [Kotlin for Developers series is updated to Kotlin 1.9 and ready for 2.0](<https://devfeed.tech/articles/kotlin-for-developers-series-is-updated-to-kotlin-1-9-and-ready-for-2-0-39231.md>)

Original publisher: [Read original article](<https://kt.academy/article/books-ready-for-kotlin-2_0>)

Published: 2023-09-26T00:00:00Z

Content type: release

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Kotlin programming](<https://devfeed.tech/topics/kotlin-programming.md>)

Tags: [books](<https://devfeed.tech/tags/books.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [updated](<https://devfeed.tech/tags/updated.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

The Kotlin for Developers book series has been updated to Kotlin 1.9 and is described as ready for Kotlin 2.0.

### Source excerpt

All the books from the series Kotlin for Developers are ready for Kotlin 2.0!