The Daily Kotlin
1.55K subscribers
55 photos
1 video
1 file
570 links
Kotlin Chats in Telegram:
RU https://kug.community/
EN https://kug.community/en

Kotlin news and tips
Download Telegram
๐Ÿš€ Kotlin Ecosystem Mentorship Program (pilot) is live!

Want to get into Kotlin open source (or help someone do it)? The Kotlin Foundation is matching project maintainers (mentors) with new contributors (mentees) to ship at least 1 meaningful contribution (code, docs, tooling, etc.).

๐Ÿ—“ Timeline: mid-Feb โ†’ early April
โฑ Time: mentors ~30โ€“60 min/week โ€ข mentees ~2โ€“4 h/week
๐ŸŽ Perks: Kotlin swag for successful pairs + one random pair wins an all-expenses trip to KotlinConf 2026
๐Ÿ“ฉ Pairs announced by: Feb 16, 2026

๐Ÿ‘‰ Apply as mentor or mentee via the surveys in the post.
โค2
๐ŸŽ‰ Better Immutability in Kotlin aka "Value Classes 2.0"

KEEP-0453: Motivation and Design Space
KEEP-0454: Multi-Field Value Classes

TL;DR:

1. value class Complex(val re: Double, val im: Double)
2. without identity
3. copy-vars: a.b = c translated into a = a.copy(b = c)
4. cross-module smart casts & more
๐Ÿ‘11๐Ÿ”ฅ5๐ŸŽ‰4โค1
โค2๐Ÿค”2
I've been using @DslMarker for quite a while just to highlight my DSLs โ€“ see the screenshots for before/after. Obviously a dirty hack, but it worked surprisingly well (until it didn't: KT-81567).

If you'd like proper, configurable DSL highlighting in IntelliJ, upvote this ticket: KTIJ-34906 โ€” Uniform and configurable color for DSLs
๐Ÿ‘1๐Ÿ‘1
Stacks for Kotlin: Design Notes and Local Lifetimes for Kotlin: Design Notes

local parameters let the compiler prove a value won't escape a call. That single primitive unlocks: non-local return without inline, stack-allocated vararg, view types that can't outlive their source, builders that statically prevent receiver leaks.

Then Stacks build on it to make suspend just one of many possible suspension mechanisms. Each coroutine-like API (`Sequence`, Flow, deeply-recursive) gets its own typed continuation instead of fighting over the single global one. @RestrictsSuspension becomes obsolete. KT-3480 fixes itself. DeepRecursiveFunction shrinks 9ร—.
๐Ÿ”ฅ4๐Ÿคฎ1
๐Ÿคฏ2๐Ÿคฎ2โค1