发布于 2017-11-29 00:53:28 | 154 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Kotlin 基于JVM的编程语言

Kotlin 是一个基于 JVM 的新的编程语言,由 JetBrains 开发。


Kotlin 1.2 发布了。多平台项目允许您从相同的代码库构建应用程序的多个层 - 后端,前端和 Android 应用程序。 这样的项目包含了独立于平台的代码的通用模块,以及特定平台(JVM 或 JS)的代码的特定模块,并且可以使用平台特定的库。 要从通用模块中调用特定于平台的代码,您可以指定预期的声明 - 所有平台特定模块需要提供实际实现的声明。

如前所述,开发团队也在研究一系列通用库,以便将更多的逻辑转移到通用代码中:

  • kotlin.test, 在Kotlin 1.2开箱即用,只要编写一次测试就能在 JVM 和 JS 下运行;

  • kotlinx.html 支持同构渲染 - 使用相同的代码在后端和前端渲染 HTML;

  • kotlinx.serialization 允许您使用 JSON 或 ProtoBuf 作为序列化格式,轻松地将 Kotlin 对象封装在应用程序的不同层之间。

编译性能提升 25%,下图显示了使用 Kotlin 构建的两个大型 JetBrains 项目的编译时间差异:

其他改进:

  • A more concise syntax for passing multiple arguments to an annotation (array literals);

  • Support for the lateinit modifier on top-level properties and local variables, as well as checking whether a lateinit variable is initialized;

  • Smarter smart casts and improved type inference in certain cases;

  • Compatibility of the standard library with the split package restrictions introduced in Java 9;

  • New kotlin.math package in the standard library;

  • New standard library functions for working with sequences and collections, including a set of functions for breaking a collection or sequence into potentially overlapping groups of a fixed size.

下载地址:



历史版本 :
Kotlin 1.2.21 发布,Bug 修复版本
Kotlin 1.2.20 发布:添加对 Gradle 构建缓存的支持
Kotlin/Native 0.5 支持在Swift, C和LLVM 5中使用 Kotlin
Kotlin 1.2 发布,实现平台间共享代码
Kotlin 1.1.60 发布,开始支持增量编译
Kotlin 1.2 Beta2 发布:显著提升编译器性能
Kotlin 1.2 Beta 版发布,基于 JVM 的编程语言
Kotlin 1.1.50 发布,基于 JVM 的编程语言
Kotlin 1.1.4 发布,改进对 Java 9 的支持
Kotlin 1.2 M2 发布,1.2 系列的早期访问版
Kotlin 1.2-M1 发布,1.2 系列的早期访问版
Kotlin 1.1.3 发布,初始支持 JDK 9
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务