Kotlin 1.3 RC 版釋出:遷移你的 coroutines 程式吧!
Kotlin 1.3 RC 版 ofollow,noindex">釋出了 ,這是 1.3 的最新預覽版和候選版,更新內容主要包含與新語言功能相關的關鍵錯誤修復,值得注意的變化包括:
-
Ktor is wrapping up its API and looking forward to your feedback. Ktor is a framework for building web applications, HTTP services, mobile and browser applications. It’s elegant, asynchronous and built on coroutines.
-
The official code style is now used for all new projects. We also encourage you to migrate old projects to the official style.
-
The
main
entrypoint can now take no parameters and also can be a suspending function. -
Experimental support for scripting introduced in version 1.2.50 has been reworked and improved.
-
An experimental
kotlinx.serialization
plugin has been merged to the main Kotlin project. Now it’s a bundled compiler plugin. -
There are new deprecations in the standard library, as well as errors for some old deprecations.
-
Annotations in the
org.jetbrains.annotations
package were extracted from the standard library to separate artifacts.
此外,Kotlin 1.3 協同程式已達到穩定狀態。現在是使用舊的實驗協同程式遷移庫的好時機,官方亦提供了工具幫助我們遷移程式碼。 詳情請檢視釋出說明 。