Kotlin is always happy to learn from other programming languages, and this is why we decided to support S-expressions, the empowering concept of LISP.
The main motivation behind this is the compatibility with Clojure, the LISP for the JVM. Clojure is well-known for its solid libraries, particularly the ones used for concurrency and read-only data structures.
To facilitate interoperability with LISP (and Clojure libraries in particular), Kotlin now allows expressions like this one:
"first lambda: "
(+"second lambda: "arg1 arg2)
This is only to give you the taste. Now, let’s explain the constructs one-by-one. Continue reading →
Kotlin M7 is here and with it some long awaited features.
Compiler and Language Changes
One of the biggest features of M7 is support for inline functions. Kotlin encourages the use of higher-order functions (some people call this “functional style”) which entails extensive use of lambda expressions. Starting with M7, you can declare a higher-order function as “inline” which means that its body will be inlined at the call site along with any lambdas passed to it. This means that the performance penalty of using such functions is next to nothing. For instance, having a for loop as opposed to using forEach and passing a lambda will have very little difference in terms of speed.
For a while now, a fewofus have been working on a project called Spek, a framework that allows you to write executable specifications. It allows you to write specifications (i.e. tests) in a more human-readable, and what’s more important, descriptive manner, without having to resort to long test names, underscores or regular expressions.
Meet JetBrains and Kotlin team members Svetlana Isakova and Aleksei Sedunov, November 11-15, at the sold-out Devoxx Belgium conference. We invite you to stop by our booth for an impromptu demo, some great gifts and a chance to win a free personal license.
Don’t miss the following great Kotlin events:
Hackergarten Hands-on Coding
On Tuesday, November 12th, Aleksei will be participating in the Hackergarten hands-on coding event. He will get you started with the Kotlin language and will help you write a plugin for IntelliJ IDEA in Kotlin.
Join Svetlana and Aleksei Thursday, November 14th, 10:50 -11:50 in Room 6. In this talk we’re going to tell the story of Java puzzlers from the Kotlin perspective which would demonstrate how Kotlin design helps to eliminate some problematic issues found in Java. In particular, we’d consider such aspects as expressions and control structures, exception handling, object and classes, nullable types and extensions.
About Svetlana Isakova
Svetlana has been a developer on the Kotlin team since 2011. Before joining Kotlin she had a passion for the Scala programming language. Currently she is responsible for the Kotlin overload resolution and type argument inference algorithms.
About Aleksei Sedunov
Aleksei is a developer at JetBrains and a member of Kotlin team since 2012. Before joining Kotlin he’d been senior developer at DataArt working on the Java-based server-side solutions for 4+ years.
To get a taste of the upcoming action, watch this short video of the awesome people and atmosphere at the JetBrains booth from Devoxx 2012.
Kotlin can be freely mixed with Java. That means that you can easily add Kotlin code to an existing Java project. All you need to do is create a new Kotlin file (*.kt) and tell the environment to use Kotlin. If you’re using IntelliJ IDEA, it can do this for you automatically. Continue reading →