[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News JetBrains introduces the new JVM language Kotlin

JetBrains introduces the new JVM language Kotlin

This item in japanese

Jul 23, 2011 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

So far, Kotlin has been primarily known as a Russian island thirty kilometers west of Saint Petersburg. More recently, the Czech company JetBrains introduced a new programming language named Kotlin running on the JVM (Java Virtual Machine). It is the intent of the language developers to get rid of some challenges in the Java language.

JetBrains’ product portfolio mainly consists of IDE for Java, PHP, Objective-C, Ruby and MPS. With the Project Kotlin they are now entering unchartered space.

The language developers emphasize, that the main design goals behind their project are:

According to JetBrains, the new language is statically typed, object-oriented, targets the JVM, is built for industrial use, and gets rid of problems and challenges in Java that are due to backward compatibility.

For instance, the type system takes control of Null references so that Kotlin does not need Null Pointer Exceptions. There are no raw types in Kotlin, arrays are invariant, and generics are type-safe even at runtime. In addition, the language supports clojures that can be optimized using inlining. And it doesn’t support checked exceptions, which many language designers consider a bad feature, anyway. An essential aspect is the interoperability between Kotlin and Java: Kotlin can call Java, and Java can call Kotlin.

The following code snippet illustrates a simple object-oriented “Hello World” implemented in Kotlin. Further examples are available by JetBrains.

class Greeter(name : String) { 
 fun greet() {
 println("Hello, ${name}"); 
 } 
} 
fun main(args : Array<String>) { 
 Greeter(args[0]).greet() 
}

There are a couple of other languages that consider themselves reasonable alternatives to Java. In particular, Scala, Fantom, Groovy, Gosu, and Ceylon are natural competitors with Scala and Groovy having achieved the most distribution.

At the moment, there is lot of - sometimes heated - debate in different discussion groups how Kotlin compares to other languages such as in the Fantom website or in the Scala user group.

It remains to be seen how many software developers will consider Kotlin as their language of choice. At least, the reactions of many developers prove that Kotlin has at least entered the race for the next new cool language.

A public Beta will be available at the end of 2011. Reportedly, there will be an open source compiler and IntelliJ IDEA plug-in under the Apache 2 license. While the compiler will initially emit Java byte-code, there might also be a Kotlin version emitting JavaScript.

Rate this Article

Adoption
Style

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /