I’m writing a Kotlin/JS library, and I want to hid...
# language-proposals
a
I’m writing a Kotlin/JS library, and I want to hide the ‘external’ wrappers from library consumers, so I mark them as ‘internal’ The resulting ‘internal external’ is pretty confusing! The two words mean contradictory things.
Copy code
internal external interface ValuesManager {
  fun access(id: Int) : LibValue
}

/** Some value, might be X/Y/Z - use extension functions to convert (...) */
external interface LibValue
Perhaps code marked as ‘external’ could be assumed to be ‘internal’, and could be specifically overridden to be ‘public’ or ‘private’?
Copy code
// internal is inferred, but can be manually specified if required
/*internal*/ external interface ValuesManager {
  fun access(id: Int) : LibValue
}

// have to explicitly type 'public'
public external interface LibValue
Or will https://youtrack.jetbrains.com/issue/KT-29227 help?
a
I don't think in kotlin context they are contradictory coz external and internal are clearly defined already