π‘ What is kotlin?
Kotlin is an open-source statically typed programming language that targets the JVM, Android, JavaScript and Native. Itβs developed by JetBrains. The project started in 2010 and was open source from very early on. The first official 1.0 release was in February 2016.
π Definition from the official FAQ.
π History
- Jetbrains announce the Kotlin Project, a new programming language that it had been building up for over a year and it is compatible with the JVM.
- The Kotlin programming language was licensed as an Apache 2.0 project.
- Version 1.0 was released, it was the first stable version.
- On Google I/O 2017 the first-class support for the kotlin language for Android development was announced. Uses.
- Version 1.2 was released.
- Version 1.3 was released.
- Version 1.4 was released.
- Versions 1.5 and 1.6 were released.
π Hello world
The next lines show you how a basic hello world is. These lines can be complete content of a file .kt (the Kotlin extension) and it will print “Hello world” after compiling and executing it.
|
|
π Uses
-
Android development: Kotlin is now the preferred language for Android developers and a lot of new libraries are now written in kotlin.
π Learn more at developer.android.com/kotlin -
Server-side development: Because Kotlin is interoperable with Java, there are many frameworks and libraries that have official support, and new frameworks have been created like Ktor.
π For example the Ktor Project
π Using Kotlin with Spring Boot
π Vertx for Kotlin -
Web development: Kotlin is capable of transpile to the JS language and this allows using projects that aim to create web projects using Kotlin.
π Jetpack Compose for web -
Desktop development: Any UI framework or library from the Java world can be used with kotlin.
π Jetpack Compose for desktop
π TornadoFX -
Native development: You can compile to binary and target for a variety of platforms that a VM is not used, for example, the Android NDK, iOS, Mac, Linux, Windows, etc.
π Learn more of Kotlin Native -
Data science: Just like other technologies that came from the Java world, data science takes advantage of existing projects and accepts kotlin as a supported language.
π Learn more of Kotlin for data science -
Multiplatform mobile development: This initiative offers you to share code between Android and iOS projects and lets you keep the UI and platform-specific features separate from the domain logic. π Learn more of Kotlin multiplatform
-
Gradle plugins: Now you can use Kotlin instead of groovy to write Gradle plugins and scripts.
π Learn more of using Kotlin on Gradle -
AWS SDK: Recently amazon announce a new SDK to allow developers to call AWS services using kotlin specific features.
π Official announcement
β Did you know β¦?
-
Roman Elizarov is the project lead of the Kotlin Project.
-
The name βKotlinβ comes from an island called βKotlin Islandβ near St. Petersburg.
-
One of the reasons for creating a new language was to improve sales of IntelliJ IDEA.
-
Eclipse and Netbeans have an official plugin for Kotlin.