Hi Nice Robot,

Thank you for reading.

First of all, let me point out that the link you provide is with the title Kotlin’s default visibility should be internal. and not Everything should be private or internal by default. If you read the content, it is clearly stated that “Why the default is public”. Kotlin function and variable is public by default.

Anyway, in my writing, it is not intended to state if a language should have its function or variable private or public. Instead, I’m stating if there’s a default value, then we don’t need to explicitly state it again. The IDE auto-complete feature will help prevent one from accidentally access a private function.

In older days, the IDE doesn’t have the ability to have proper autocomplete. Hence having one specifically the visibility of the function explicitly is must, to avoid the programmer mistakenly access a private function or variable accidentally, and cause compiler error later.

In short, you have misunderstood what I wrote, thinking I’m advocating for public interfaces, which is not my intent.

Written by

Passionate about learning, and sharing mobile development and others https://twitter.com/elye_project https://www.facebook.com/elye.proj

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store