Posts

Showing posts from October, 2026

Kotlin Companion Extensions and Blocks

Companion objects have been Kotlin’s answer to static members since 1.0. With Kotlin 2.5.0, KEEP-0449 introduces two new experimental features — companion blocks and companion extensions — that finally decouple “accessible through the type name” from “there is an object behind it”. After a recap of why the companion object was not quite enough, this article walks through the syntax and the use cases. Read the article on medium...