设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客

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

2014-10-16 16:10| 发布者: joejoe0332| 查看: 1231| 评论: 0|原作者: oschina|来自: oschina

摘要: Kotlin 是一个基于 JVM 的新的编程语言,由 JetBrains 开发。其主要设计目标:创建一种兼容Java的语言让它比Java更安全,能够静态检测常见的陷阱。如:引用空指针让它比Java更简洁,通过支持variable type inference ...

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$

  • 增量构建

Incremental

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

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

make-options

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 改进

提取函数重构和代码重复

create-entry

duplicate-find

从 Usage 创建

create-usage

模块改进

通过 Convention 查找和重命名

operator-rename

it-renaming

其他 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 文档更新

更多内容请看发行说明

酷毙

雷人
1

鲜花

鸡蛋

漂亮

刚表态过的朋友 (1 人)

  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部