We've seen that Kotlin and Java can exist, side by side, within the same code base. It's possible to work between the two languages without issue, but there are costs associated with having multiple languages within a single project. In this section, we'll explore a few of these costs.
Are two languages better than one?
Project structure
Your Kotlin and Java files can exist within the same source directories inside your project. You do not need to separate Kotlin and Java into homogeneous packages, modules, and so on. In general, your Kotlin and Java files will follow similar conventions for package naming and imports; however, Kotlin files can specify an arbitrary package name. This means that even though two...