3 ms·
It's not perfect, but Kotlin already has a limited form of this with its ReplaceWith annotation [0]. It allows you to mark something as @Deprecated and to speci
by lolinder 2y ago
It's not perfect, but Kotlin already has a limited form of this with its ReplaceWith annotation [0]. It allows you to mark something as @Deprecated and to specify what should be used instead. IDEs and other tooling can pick that up and apply it automatically.
This assumes that you're approaching the breaking change problem from the perspective of immutable names and deprecations: don't make breaking changes to existing names, create a new name for the new behavior and communicate that the old behavior is no longer going to be supported.
[0] https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-replace-with/ https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-replac...