5/28/2023 0 Comments KotlinThat means Kotlin can use any framework, library etc. It is fully compatible with Java, and Kotlin code can be simply converted to Java code and vice versa (there is a plugin from JetBrains). What makes it useful in Android development is that it compiles to JVM bytecode, and can be also compiled to JavaScript. Kotlin is a new language (sometimes referred to as Swift for Android), developed by the JetBrains team, and is now in its 1.0.2 version. And what if I told you that you can use a very nice, simple language, with null safety, lambdas, and many other nice new features? Welcome to Kotlin. Very often I hear Android developers say “I wish Android supported a nicer language, like iOS does with Swift”. Above Android N, we can use some of Java 8’s new functionalities, but it’s still that old, heavy Java. Developers can also attach RetroLambda to use lambda expressions in their code, which is very useful while using RxJava. The disadvantage is that below Android N, we are still limited to Java 6 (including some small parts of Java 7). I think that Java isn’t the master of elegance or clarity, and it is neither modern nor expressive (and I’m guessing you agree). What Is Kotlin, and Why Should You Use It? Thus, we have to help ourselves in that great journey in the Android world. Google is still striving for perfection, but we all know that ideal worlds don’t exist. Sounds great, right? Unfortunately, the Android world isn’t this ideal. Our activities are not too large and complicated, we can change data sources from database to web without tons of differences, and so on. Then while creating a very nice app, it appears fully testable, extensible, and maintainable. You can write less by doing more, and whenever a new feature appears, developers can use it just by increasing version in Gradle. In a perfect Android world, the main language of Java is really modern, clear, and elegant.
0 Comments
Leave a Reply. |