Join Slack
I have a question regarding the `public` modifier in Kotlin. Since everything is already public by d...
# compiler
c
coroutinedispatcher
10/16/2020, 2:32 PM
I have a question regarding the
public
modifier in Kotlin. Since everything is already public by default, is there a use case where you actually need to "force" put that modifier? Basically, at the moment I cannot think of such case, when you need a
public
modifier in front of something.
m
Marc Knaup
10/16/2020, 2:34 PM
Explicit API mode is one case:
https://kotlinlang.org/docs/reference/whatsnew14.html#explicit-api-mode-for-library-authors
c
coroutinedispatcher
10/16/2020, 2:35 PM
That was pretty cool, I didn't know that. Thank you
m
Marc Knaup
10/16/2020, 2:36 PM
Also if you want to widen the visibility of an inherited function or property.
👍 4
3
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by