When working with both languages in a single project, there is an increase in the overall complexity of the project. It requires a developer to be comfortable with two languages to understand the entirety of the code base. There is increased complexity in having to consider multiple typing models, and also in having to consider how code can be consumed from each language.
Having multiple languages could be seen as a risk to management, or as an additional challenge to new developers. This can impact on hiring or resource allocation as well. You may have to consider how to integrate, refactor, or rewrite your app using Kotlin, and the ramifications this has on your time and resources.
All of these questions have answers, and have been dealt with by many teams and developers, but you'll have to evaluate them for your specific situation if you are considering adding Kotlin to your existing code base. Here are a few common questions for you to consider:
- Which language will the new code be written in?
- Will you migrate your entire code base to Kotlin, or only new developments?
- Do you want to start adding Kotlin in production, or start with tests?
- Are there people on your team who are comfortable with the language and willing to mentor others?
By thinking through these questions, you may start to form a foundation on which to answer other questions that come up around the complexities of using both languages in a single project.