红联Linux门户
Linux帮助

Kotlin M9发布,基于JVM的编程语言

发布时间:2014-10-16 09:13:46来源:红联作者:empast
Kotlin 是一个基于 JVM 的新的编程语言,由 JetBrains 开发。

其主要设计目标:

创建一种兼容Java的语言

让它比Java更安全,能够静态检测常见的陷阱。如:引用空指针

让它比Java更简洁,通过支持variable type inference,higher-order functions (closures),extension functions,mixins and first-class delegation等实现。

让它比最成熟的竞争对手Scala语言更加简单。

Kotlin M9 发布,此版本包括重要的新特性和改进:

语言改进

平台类型

更多平台互操作

不再有本地对象声明

非本地返回

Type 不再是关键字

Unit 现在是命名对象

Foo.instance$ 变成 Foo.INSTANCE$

增量构建

注意 此特性是尝试性的,如果遇到不能运行的地方,请运行 Rebuild Project。

支持编译器选项下的 making projects automatically

JavaScript 支持

除了改进了标准库,同时还改进了语言支持,允许:

Delegation (class Foo : Bar by baz)

Callable references for functions and properties (::foo)

Support for Long and improved support for Char types

Inline functions support

Multiple catch-blocks

重要改进:

Native traits exist only at compile time

Some changes in function name mangling

Moving and renaming some packages

js.* is now kotlin.js.*

js.query.* is now jquery.*

js.debug.* is now kotlin.js.*

Changes in println() behavior:

on node.js - write to stdout

otherwise (in the browser) - buffered write to console.log, flush buffer to console on “\n”

IntelliJ IDEA 改进

提取函数重构和代码重复

从 Usage 创建

模块改进

通过 Convention 查找和重命名

其他 IDE 改进

Debugger. Now supports delegated properties.

Completion. Overall improvements in completion in addition to completion for as when expected types are known at the point of invocation

Expand selection. Offering pretty much all the same functionality we currently have for Java

Java to Kotlin converter. Allowing for more conversion scenarios.

还有大量 bug 修复。

命令行接口改进

JVM 代码生成和性能改进

API 文档更新

更多内容请看发行说明。

软件详情:http://blog.jetbrains.com/kotlin/2014/10/m9-is-here/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+kotlin+%28Project+Kotlin%29

来自:开源中国社区
文章评论

共有 0 条评论