Kotlin 1.0.5: The journey continues
Dmitry Jemerov, principal engineer at JetBrains, announced the release of Kotlin 1.0.5 in a blog post and acknowledged that it basically “continues the series of bugfix and tooling updates for Kotlin 1.0.”
You can find the entire list of fixes and improvements here.
Changes to Kotlin 1.0.5
Loop to lambda conversion is among the changes; the IntelliJ IDEA plugin can identify many cases where imperative
for loops can be rewritten in a more idiomatic and compact way using standard library functions such as
map. As an example, this:
is automatically converted into this.
If you want to trigger the conversion, all you need to do is put the caret on the
for keyword and press Alt-Enter.
Postfix code completion is now supported for Kotlin and there are lots of templates. However, it is worth mentioning that this feature is unavailable in Android Studio 2.2 because it depends on platform changes made in IntelliJ IDEA 2016.2. Good news, though prefix code completion will be supported in newer versions of Android Studio based on newer IntelliJ Platform versions.
“Extract Interface” and “Extract Superclass” refactorings are also supported — they were previously supported just for Java and some other languages. The Kotlin plugin also supports a new refactoring “Introduce Type Parameter”, thus offering an easy way to change a class or function into a generic one.
- You can now use the
- Class literals (
Foo::class) are now supported. However, the value of a
::classexpression only defines a
simpleNameproperty to access the class name — it does not implement the full
Check out the previous release here.