Kotlin Eclipse Plugin 0.2.0

Kotlin Eclipse Plugin 0.2.0

Today we are happy to present a new version of Kotlin plugin for Eclipse. This release includes the following features:

  • Update to Kotlin M12
  • Java to Kotlin converter
  • Navigation to Kotlin sources from Java
  • Kotlin syntax highlighting in Compare View

Continue reading

Posted in Tools | 3 Comments

Fibers and Actors in Kotlin with Quasar

In the previous post we mentioned that the Quasar library now supports Kotlin, providing awesome support for fibers (lightweight threads), Go-like channels, Erlang-like actors, and other asynchronous tools.

Our friends from Parallel Universe have published a blog post that dives into details of using Quasar with Kotlin. Even in the unlikely case that multithreading doesn’t concern you much, Quasar/Kotlin integration is a great example of a “DSL” library written in Kotlin, it uses

  • data classes
  • top-level functions
  • lambdas
  • annotated expressions
  • when-expressions
  • inline functions

to build a natural-looking and efficient API, and the blog post explains it very well.


Posted in Libraries | 2 Comments

Kotlin M12 is out!

We are happy to present Kotlin M12, bringing some rather important changes and new features:

  • New syntax for annotations and enums
  • More convenient semantics of function types
  • Better smart casts
  • kapt for Java Annotation Processing support
  • Multiple IDE features
  • and more…
    Continue reading
Posted in Releases | 47 Comments

kapt: Annotation Processing for Kotlin

This post is largely outdated.
Please check out Better Annotation Processing: Supporting Stubs in kapt

As there have been many requests to support Java Annotation Processing, we are working on it, and first results are ready for preview. This is the call for early feedback. Continue reading

Posted in Android, Tools | 21 Comments

Advanced Features of Anko

Last week we published a new version of Anko. While the main purpose of this library is creating layouts though a DSL, even the users of XML layouts can benefit from it. Today we are going to talk about such “ambivalent” features of Anko. Continue reading

Posted in Android | 3 Comments

Anko 0.6 is Released

Today we are glad to present the new version of Anko — a library which facilitates Android application development. We are happy to have received lots of feedback, and some of the changes in 0.6 were actually proposed by the community.
Continue reading

Posted in Android | 15 Comments

Try Kotlin in Your Browser: New Look and More Features

We released Kotlin Web Demo quite a while ago, it did a good job helping people try Kotlin right in the browser and share runnable code with each other. Now, a shiny new version is ready, it’s time to retire the old one.

Meet try.kotlinlang.org, as new incarnation of a web-based mini-IDE for Kotlin. Continue reading

Posted in Tools | 16 Comments

Upcoming Change: More Null-safety for Java

Our battle for combining null-safety and Java interop has been a long one already:

  • we started off treating all Java reference types as nullable, and it was too inconvenient;
  • then we employed external annotations to specify nullability, created KAnnotator, but the whole thing was too fragile when versioning was concerned, and sometimes the users couldn’t do what they needed to (especially when it came to inheritance);
  • in M9 we discarded the annotations (for the time being), and introduced platform types, now anything could be done, but we lost (some) type-safety;
  • in M11 we started bringing the useful aspects of annotations back by issuing warnings where Java nullability constraints were violated.

Now, we are planning to make one more step and use annotations in combination with platform types to bring back as much type-safety as possible. Continue reading

Posted in Language design | Comments Off

Upcoming Change: Function Types Reform

Kotlin M12 will likely bring another change that is crucial for implementing a useful reflection library for Kotlin. In short, we are going to unify FunctionX and ExtensionFunctionX to be represented in the same way at runtime, but it will not affect our ability to create type-safe builders and other DSL-like constructs. Continue reading

Posted in Language design | 11 Comments

Announcing Anko for Android

We’re excited to announce a library we’ve been working on for Android development, which, among other things allows the creation of Application Interfaces in a type-safe and dynamic way using a DSL.

A Sample Taste

Here is a small example describing some of Anko’s possibilities. Imagine we need to create a simple sign-up form consisting of an EditText for a username and a “Sign up” Button. The code for this, using Anko would be:

Continue reading

Posted in Android | 53 Comments