Hey all (firefox-focus-public and mobile-firefox-dev),

We just started a new Focus/Klar for Android sprint and I intent to enable
Kotlin support:
https://github.com/mozilla-mobile/focus-android/issues/975

Kotlin itself is not new. But since last I/O it is now an official
first-class language to develop Android applications - support by the
Android team(s).

I do not want to write much about the language itself. Some good links to
get started are:
- https://developer.android.com/kotlin/index.html
- https://kotlinlang.org/
-
https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/edit
- https://www.youtube.com/watch?v=X1RVYt2QKQE
- https://www.youtube.com/watch?v=YbF8Q8LxAJs

Some of the reasons why I would like to use it in Focus:
- (1) It can be used side-by-side with Java code. You can call Java code
from Kotlin and Kotlin code from Java as if it would be the same language.
This makes it pretty nice to gradually introduce new code in Kotlin.
- (2) Because of (1) I do not intent to migrate our existing Java code to
Kotlin. The existing code is tested and it would be a waste of time to
replace it without the need to do it. Of course migrating existing code
could happen as part of writing new code or fixing bugs.
- (3) Getting started with Kotlin in Focus is simple and straight-forward -
compared to Fennec.
- (4) Thanks to Proguard there's no noticeable drawback in regards to APK
size or method count.
- (5) There are no blockers from legal side and/or tooling.

I want to encourage everyone working on Focus to try Kotlin and start
writing new features in it as soon as you feel comfortable with it. However
at this point it's not a requirement for new code. :)

Best,
Sebastian
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to