Value classes in Kotlin 2.5.0 and beyond

Alejandro Serrano Mena · 2026年12月2日

AI 摘要 AI 生成,可能有误

Kotlin 2.5.0 推出了处于 Alpha 阶段的完整值类:这是一种不可变类,其主属性数量不受限制,可在所有平台和 JVM 版本上使用。从 JDK 28 开始,这些值类可以编译为 JVM 值类,从而受益于 Project Valhalla 的性能优化;即将发布的版本还将带来基于名称的解构、用于便捷更新的“复制属性”功能(预计于 Kotlin 2.6.0 推出)、多平台内联值类,以及围绕标识、相等性和 lambda 捕获的改进诊断。由于该功能仍处于 Alpha 阶段且可能发生破坏性变更,JetBrains 邀请社区在玩具项目中试验值类,并在最终设计确定之前分享反馈。

Kotlin 2.5.0 brings a long-awaited feature: full value classes! They are available in the Alpha stage, and in this blog post we’ll explain what full value classes are, how they compare to data classes, and how they connect to Project Valhalla on the JVM.

Full value classes represent the next step towards ergonomic data-oriented programming and immutability in Kotlin. Nowadays, entire frameworks like Jetpack Compose are built on the notion of immutable data, and once mutability is gone, a big class of concurrency bugs disappears as well. At the same time, platforms like the JVM start bringing performance improvements for immutable data.

Full value classes are Kotlin’s answer to these trends. Our goal is to make the right thing also the most convenient thing: you write the code that is as concise as with data classes but get stronger safety guarantees and, potentially, better performance.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 JetBrains Blog

New Bug-Fix Releases for MPS Versions 2026.2.1, 2026.1.3, 2025.3.4, 2025.2.6, and 2025.1.6

AI 摘要JetBrains has released bug-fix updates for all supported MPS versions (2026.2.1, 2026.1.3, 2025.3.4, 2025.2.6, and 2025.1.6) that mitigate a critical security vulnerability, CVE-2026-114938 (Java4Shell), which affects the bundled JetBrains Runtime and also impacts standalone MPS-based RCP applications that must be rebuilt with the updated startup scripts. In addition to the security fixes and a Marketplace Zip Signer library issue, MPS 2026.2.1 and 2026.1.3 bring improvements such as Projectional Agent Toolkit enhancements, a warning for isExactly with interface concepts, a fixed single-pass UpdateConceptMethodCall migration, a restored Navigation Bar, restored Go to Root Node shortcut, editor/diff performance improvements, and GitHub Copilot compatibility. The 2025 versions include only the security fix.

Kotlin 2.5.0 Released

AI 摘要Kotlin 2.5.0 has been released, marking Kotlin/Wasm as Stable, along with language improvements such as stable name-based destructuring, an unused return value checker, and improved compile-time constants. The release also brings experimental standard library functions, Java 28 support for Kotlin/JVM, Swift export in Beta for Kotlin/Native, a new publication format for Kotlin Multiplatform libraries, and es2020 target support for Kotlin/JS. Users can update through the latest versions of IntelliJ IDEA and Android Studio or download the command-line compiler from GitHub.

JetBrains at 26: Our Priorities

AI 摘要JetBrains has introduced a Voluntary Departure and Support Programme, allowing eligible employees to leave with a separation package as the company adapts to AI-driven changes in software development with a smaller, more focused team. The company emphasizes that it will continue developing its IDEs, JetBrains Air, and Kotlin, and will honor existing customer agreements and support commitments. Looking forward, JetBrains is building Air as an open system for agentic software development, helping developers, teams, and organizations direct, review, and govern AI agents' work across IDEs, terminals, and cloud environments.

Compose Multiplatform 1.13.0 Released

AI 摘要Compose Multiplatform 1.13.0 has been released, bringing improvements across iOS, web, and desktop development. Key highlights include content-based sizing for Compose views embedded in SwiftUI and UIKit, an experimental WebGL interoperability API for integrating custom graphics and 3D content, and faster desktop startup through AppCDS or AOT caching, with cold starts up to 4.8× faster in benchmarks. The release also incorporates updates from Jetpack Compose 1.13, such as stable FlexBox, Grid, and LazyLayoutCacheWindow APIs.

dotInsights | December 2026

AI 摘要The December 2026 edition of dotInsights, JetBrains' newsletter for .NET developers, opens with a tip explaining that C#'s async/await does not spawn new threads but instead enables efficient suspension of method execution. It curates recent community articles on topics such as .NET 11 and C# 15 union types, .NET MAUI updates, EF Core performance, and AI-assisted development. The issue also shares JetBrains news, including Rider and ReSharper 2026.3 releases with .NET 11 support and a security advisory urging updates due to the Java4Shell vulnerability.