Welcome to Kotlin documentation page!
Disclaimer: this is not a language specification. Neither is it a complete reference manual. These documents are written to give you an impression of what kind of language Kotlin is. Some of the examples are somewhat speculative as the implementation of the compiler and library is currently in progress. Most of the details presented here are subject to change. Your feedback and suggestions are very welcome. You can write comments or file an issue in the issue tracker.
Introductory Video
For an introduction, check out the presentation slides and video from StrangeLoop 2011.
More presentations are available on the Talks and Publications page.
What is Kotlin?
"Project Kotlin" is the codename for a statically-typed JVM-targeted programming language developed by JetBrains and intended for industrial use.
Why a new language?
At JetBrains, we’ve been developing for the Java platform for a long time, and we know how good it is. On the other hand, we know that the Java programming language has certain limitations and problems that are either impossible or very hard to fix due to backward-compatibility issues. We know that Java is going to stand long, but we believe that the community can benefit from a new statically typed JVM-targeted language free of the legacy trouble and having the features so desperately wanted by the developers.
The main design goals behind this project are
- to create a Java-compatible language,
- that compiles at least as fast as Java,
- make it safer than Java, i.e. statically check for common pitfalls such as null pointer dereference,
- make it more concise than Java by supporting variable type inference, higher-order functions (closures), extension functions, code in interfaces and first-class delegation, etc;
- and, keeping the useful level of expressiveness (see above), make it as simple as possible.
See more here.
What does it look like?
fun main(args : Array<String>) { println("Hello, world!") }See more here and below.
Development status
The compiler is being developed alongside with an IntelliJ IDEA integration.
Kotlin is an Open Source project. Distributed under Apache 2 License.
| Kotlin is Under Development Please report bugs to our Issue Tracker |
If you're interested in keeping track of the project status, you're welcome to subscribe to the Kotlin blog or to follow us on Twitter.
Read more
FAQ. See this page for the answers to the most common questions.
API Documentation for the Standard Library can be found here.
Check out some Examples to get an idea of what Kotlin is:
- Hello, world!
- Basic syntax walk-through
- Address book — collections and higher-order functions
- HTML builder — declarative structures
- More... — extensions, pattern matching, IO, operator overloading, etc.
If you are a Java developer, look here:
If you got interested, take the Feature tour:
- Modules and Compilation
- Packages
- Functions
- Properties And Fields
- Basic types
- Expressions
- Pattern matching
- Classes and Inheritance
- Generics
- Null-safety
- Exceptions
- Java interoperability
Check out the Grammar for a formal syntax description.
