Kotlin

The Companions to Come

Kotlin is developing experimental companion blocks and companion extensions to provide new ways to define class-level functionality and improve interoperability across platforms. Available from Kotlin 2.5.0, a companion block can declare members such as constants, while companion extensions can add class members to types developers do not control. The post also offers preliminary migration guidance for the changes. These features alter how such members are compiled compared with traditional companion objects.

AI-written summary, checked against the cited sources. How summaries work

Read at JetBrains Kotlin