https://kotlinlang.org logo
#getting-started
Title
# getting-started
n

Nga Pham

06/21/2022, 3:23 PM
I am tasked with convincing my team to adopt Kotlin. What are key features of Kotlin and its long term trend? Thanks
p

Phani Mahesh

06/21/2022, 3:24 PM
null safety, good concurrency primitives, less boilerplate, good java interop.
1
j

Joffrey

06/21/2022, 3:24 PM
What kind of system/product is your team working on? JVM backend/service? Web app with frontend and backend? Android application? Android+iOS applications? (the features to highlight might be different depending on this)
l

Landry Norris

06/21/2022, 3:30 PM
In terms of future trends, I think that’s the primary advantage. Kotlin is still rapidly improving. With things like #compose-ios, Swagger integration with #ktor, better performance, more stable plugin SDK, and lower build times with K2, there’s a lot to look forward to.
👍 1
n

Nga Pham

06/21/2022, 3:33 PM
@Joffrey it is a backend service.
j

Joffrey

06/21/2022, 3:34 PM
Currently in Java?
n

Nga Pham

06/21/2022, 3:35 PM
yes, so now considering Java vs JS vs Kotlin,
is there a bench mark test on the performance and build time?
j

Joffrey

06/21/2022, 3:38 PM
Then I would highlight first the much better type system, with built-in nullability and much better generics (Java's are really broken), while still preserving the great JVM ecosystem and performance for servers. Note that with Kotlin coroutines you can also have non-blocking request handling pretty easily, and write safer concurrent code in general.
🙏 1
n

Nga Pham

06/21/2022, 3:44 PM
any good tutorial on Kotlin Coroutines? I have heard of it much better non-blocking api request, I am curious how that is in comparing with JS Async await.
j

Joffrey

06/21/2022, 3:47 PM
There is a sort of list comparing different approaches to asynchronous programming (threads, callbacks, futures/promises, reactive streams, coroutines) on the Kotlinlang website: https://kotlinlang.org/docs/async-programming.html I'd suggest reading the official docs about coroutines as a starting point if you want to learn about them: https://kotlinlang.org/docs/coroutines-overview.html
🙏 1
k

Klitos Kyriacou

06/21/2022, 3:57 PM
Some thoughts in support of Kotlin: 1. Java programmers typically find Kotlin easy to learn and are productive with it fairly quickly; therefore as long as your company is willing to spend a small amount of training time you already have a good supply of developers both from your existing team and externally as you can recruit Java developers, and there are increasingly more potential recruits with Kotlin experience already. 2. Surveys have shown (e.g. https://www.overops.com/blog/the-top-10-exceptions-types-in-production-java-applications-based-on-1b-events/) that the most common runtime error that happens in production is NullPointerException. Kotlin syntax makes it more difficult to neglect situations where such an error can arise. 3. Kotlin is more succinct, so fewer lines mean less chance of errors and less development time.
🙏 1
n

Nga Pham

06/21/2022, 4:01 PM
Thank you! These are very good pointers for me to start out. Much appreciated.
l

Landry Norris

06/21/2022, 4:20 PM
Kotlin also directly interops with Java, so if you want to keep your existing framework, you can start migrating code over one file at a time.
4 Views