6

thunderbird-android/docs/architecture/adr/0001-switch-from-java-to-kotlin.md at...

 9 months ago
source link: https://github.com/thunderbird/thunderbird-android/blob/main/docs/architecture/adr/0001-switch-from-java-to-kotlin.md
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Breadcrumbs

/

0001-switch-from-java-to-kotlin.md

File metadata and controls

32 lines (21 loc) · 1.35 KB

0001 - Switch from Java to Kotlin

Status

  • Accepted

Context

We've been using Java as our primary language for Android development. While Java has served us well, it has certain limitations in terms of null safety, verbosity, functional programming, and more. Kotlin, officially supported by Google for Android development, offers solutions to many of these issues and provides more modern language features that can improve productivity, maintainability, and overall code quality.

Decision

Switch our primary programming language for Android development from Java to Kotlin. This will involve rewriting our existing Java codebase in Kotlin and writing all new code in Kotlin. To facilitate the transition, we will gradually refactor our existing Java codebase to Kotlin.

Consequences

  • Positive Consequences

    • Improved null safety, reducing potential for null pointer exceptions.
    • Increased code readability and maintainability due to less verbose syntax.
    • Availability of modern language features such as coroutines for asynchronous programming, and extension functions.
    • Officially supported by Google for Android development, ensuring future-proof development.
  • Negative Consequences

    • The process of refactoring existing Java code to Kotlin can be time-consuming.
    • Potential for introduction of new bugs during refactoring.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK