Jorge Bo03/18/2022, 7:50 PM
Tom Hermann03/18/2022, 8:41 PM
In most cases, you define extensions on the top level, directly under packages:https://kotlinlang.org/docs/extensions.html#scope-of-extensions In the stdlib, it is pretty common to see a plural version of the extension receiver as the filename, like
for extensions of the
type. https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/text/Strings.kt Making private extension functions in a file can also be nice if you have something that isn’t general purpose and you just want to make something read a little cleaner in the context of a file.
Landry Norris03/20/2022, 9:03 PM
Jorge Bo03/21/2022, 11:40 AM