Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Latest commit

 

History

History
115 lines (87 loc) · 4.07 KB

Kotlin M1 is Out!.md

File metadata and controls

115 lines (87 loc) · 4.07 KB
title date author tags keywords categories reward reward_title reward_wechat reward_alipay source_url translator translator_url
Kotlin M1 is Out!
2012-04-12 02:37:00 -0700
Andrey Breslav
官方动态
false
Have a nice Kotlin!

Today we are pleased to announce M1: the first milestone release of Kotlin.
Kotlin’s homepage ( kotlin.jetbrains.org ) provides full details about the language. In this post I give some highlights associated with the milestone release.

What’s in the box

Kotlin comes in form of a standalone compilerand a plugin for IntelliJ IDEA.

  • IntelliJ IDEA Plugin

Kotlin has graduated to the official plugin repository!

  • Kotlin has graduated to the official plugin repository!
  • Standalone Compiler (download here)

See the Getting Started guide for details.

Standard library

Kotlin’s Standard Library provides many useful functions, including enhancements for existing Java APIs. For example, it enables bulk data processing with map()/filter()/etc available on collections:

{% raw %}

{% endraw %}
val minors = users.filter { it.age < 21 }

{% raw %}

{% endraw %}

Or you can simply read text from a java.io.File:

{% raw %}

{% endraw %}
val text = file.readText("UTF-8")

{% raw %}

{% endraw %}

And even java.util.concurrent becomes nicer:

{% raw %}

{% endraw %}
myReentrantLock.read {
    // read your data
}

{% raw %}

{% endraw %}

See the Standard Library API documentation here .

Build tools

We have significantly improved Kotlin’s Maven Integration. First of all, Kotlin’s maven artifacts are now published in repository.jetbrains.com .
Find the instructions for building Kotlin projects as well as mixed Java/Kotlin code here . You can still use Kotlin with Ant and Griffon , of course.

What’s new

Here I’d like to point out one improvement: the IDEA plugin now does very rich semantic highlighting that can be tweaked in the Settings dialog:

{% raw %}

{% endraw %}

For the full list of changes, please see the commit history on github and the closed issues in YouTrack . The previous post provides some details on the following features:

  • JDK API enhancements
  • Code completion for extension functions
  • KDoc — API documentation generator for Kotlin
  • GitHub support
  • Annotations
  • Multiline String Templates
  • Simple Enums
  • Local Functions
  • “Assert not null” operator (!!)
  • Byte code viewer

Many thanks

Working on a cool project is a lot of fun, but working with great people is even better. I would like to thank our team at JetBrains, JetBrains guys who are not on the team, but still help us as well as the external contributors who make Kotlin move even faster, namely:

  • James Strachan: Standard Library and KDoc
  • Hiram Chirino, Franck Rasolo, Mark Petrovic, Taro Nagasawa: Standard Library improvements
  • Sergey Lukjanov, Stephen Milligan, Oleg Kunov: IDE improvements
  • Danno Ferrin: JVM back-end bug fix

Have a nice Kotlin!