Best IDE for Kotlin coders

Kotlin is young language that is designed as an "improved Java". As for all new products, the issue of choosing an IDE is especially acute. Lets take a good look on a IDEs market for Kotlin
14 June 2017   7388

Kotlin is the programming language created by JetBrains. This company is known for its IDEs, therefore at least one specialized IDE for Kotlin exists. However, it is fully compatible with Java, so you can use any platform that works with Java to code Kotlin.

Kotlin

Statically-typed programming language that runs on the Java Virtual Machine and also can be compiled to JavaScript source code

However, this is not the only option. Despite Kotlin's youth, several development environments have already appeared that fully integrated with it. So let's figure out whether it's worth making choices in favor of such solutions or you can just use the standard IDE for Java.

TryKotlin

Platforms: A cloud-based application available in the browser for any operating system.

Price: freeware.

try kotlin interfaceTryKotlin interface

Features:

  • Simple text editor for Kotlin, created by JetBrains to demonstrate the features of this language and the first acquaintance with its features;
  • A Java Virtual Machine that allows to run the code immediately;
  • Modular testing of JUnit;
  • JavaScript and Canvas support;
  • Examples of ready-made code for basic Kotlin functions;
  • Java to  Kotlin code converter;
  • The ability to save written code in a separate file and share it in social networks.

Download link.

TruKotlin video demonstation.

IntelliJ IDEA

Platforms: Windows, Linux, Mac OS.

Trial version: a 30-day trial version is available, which can be extended upon request to 90 days.

Price: license is purchased for a certain period of time. For private use IntelliJ IDEA will cost $ 149 for the year or $ 14.9 for the month. For corporate - $ 499 and $ 49.9. Startups can receive a 50% discount for three years. The Community Edition is free, it is designed to work with Java SE, Groovy, Scala.

intellij idea interfaceInterface of IntelliJ IDEA

Features:

  • IDE from the creators of Kotlin;
  • Compatible with Apache, JUnit, CVS, Subversion;
  • A large selection of refactoring tools for fast code reorganization;
  • Software testing tools, including code coverage analysis;
  • Java EE specifications and all popular Java frameworks: Spring, JSF, Hibernate and others are supported;
  • JavaScript, HTML, CSS, Ruby, Python supported.

Download link.

IntelliJ IDEA video review on the official developers' channel.

Android Studio

Platforms: Windows, Linux, Mac OS.

Price: freeware.

android studio interfaceAndroid Studio interface

Features:

  • IDE is based on IntelliJ IDEA and designed to create mobile applications for Android;
  • In May 2017, Google, the developer of Android Studio, announced the introduction of full support for Kotlin in its product;
  • Editing the interface of mobile applications in a visual editor using Drag-and-Drop;
  • View the layout on screens with different resolutions;
  • Automatic assembly and generation of .apk files using Gradle;
  • Code refactoring, search tools for performance problems and version incompatibilities;
  • Standard components and Android templates.

Download link.

Announcement of Kotlin support implementation in Android Studio 3.0.

Vim

Platforms: Windows, Mac OS, Linux, iOS, Android.

Price: freeware. Work with Kotlin requires a plugin.

vim interface
Vim interface

Features:

  • Vim is one of the most customizable text editors. It supports the saving of undo operations even after the program is closed, clipboard switching, automatic creation of the workpiece of the scripts;
  • Works in the mode of insertion, console and visual. Simultaneous opening of several files, window management;
  • Simple expansion of the editor with other languages ​​due to the large database of plugins;
  • Support syntax highlighting, automatic indentation, code checking with Syntastic;
  • The plugin is recommended on the official  page.

Download link and plugin link.

Sublime Text

Platforms: Windows, Linux, Mac OS.

Price: free application, however with periodic notification to buy a license. The cost is $ 70. Work with Kotlin needs a plugin.

sublime text interface
Sublime Text at work

Features:

  • Full support for Kotlin: syntax highlighting, errors detection, autocompletion;
  • Create your own templates and commands and quickly insert them into a file;
  • Built-in Java-compiler JavaC;
  • Ability to create own extensions;
  • The plugin is recommended on the official Kotlin page.

Download link and plugin link.

Which IDE is the best for Kotlin?

Kotlin is the programming language by JetBrains, a well-known developers from Saint-Petersburg, Russia. It is the 2nd official supported language for Android application development. We've collected the best IDEs for this language. Please, share your thoughts about the best Kotlin IDE in your opinion.

IntelliJ IDEA
59% (147 votes)
Android Studio
19% (48 votes)
Sublime Text
10% (24 votes)
Vim
9% (23 votes)
TryKotlin
4% (9 votes)
Total votes: 251

JetBrains to Roll Out Kotlin/Native 0.8

Version 0.8 of Kotlin/Native brings new features and bug fixes
13 July 2018   279

The project team of Kotlin / Native introduced the release of version 0.8. Corrections and additions have concerned the security of multithreaded programming, the expansion of library functionality and support for iOS devices. As always, alot of bugs are fixed.

Parallelism

Implemented the concept of object freezing

object Config {
  var width: Int = 10
  private set
  init {
    val file = fopen("config.txt", "r")
    if (file != null) {
              try {
              val buffer = ByteArray(2 * 1024)
                 while (true) {
                 val nextLine = fgets(buffer.refTo(0), buffer.size, file)?.toKString()
                 if (nextLine == null || nextLine.isEmpty()) break
                 val records = nextLine.split('=')
                 if (records.size != 2) continue
                 val key = records[0].trim()
                 val value = records[1].trim()
                 when (key) {
                         "width" -> width = value.toInt()
                            }
                          }
                        }
             } finally {
                fclose(file)
                    }
         }
}

This code considers the configuration file and will later receive the Config.width property. 

The Config file itself is divided for any number of threads or vorkers. After publication, the object is frozen and any attempt to change it will result in an exception (InvalidMutabilityException).

The second peculiarity of parallelism in the Kotlin / Native project is indivisible values and references. Let's add an image:

object Config {
private val icon_ = AtomicReference()
val icon: Image
get() = icon_.get()!!
fun updateIcon(file: String) {
val imageData = Image(file)
icon_.compareAndSwap(icon_.get(), imageData.freeze())
}
}

All information about the icon in the AtomicReference is frozen. Any changes are indivisible and similar information is visible to each client.

Kotlin Libraries

Starting v 0.8, the standard library (kotlin. *) is compatible with other platforms. Standard number generator and the function of mixing the collections are designed to eliminate the use of sharpened for a specific platform API. As an experiment, the project supports other libraries, for example, kotlinx.coroutines, kotlinx.serialization, and also the Ktor HTTP client.

Changes for iOS devices

Fixed issues with the publication in the App Store and the initialization of the platform. Support for the 32-bit ARM architecture of iOS processors, which allows using Kotlin / Native on older devices from Apple added.