基于 JVM 的編程語言,Kotlin 1.0 Beta 2 發布

jopen 9年前發布 | 6K 次閱讀 Kotlin

Kotlin 是一個基于 JVM 的新的編程語言,由 JetBrains 開發。

其主要設計目標:

  • 創建一種兼容Java的語言

    </li>

  • 讓它比Java更安全,能夠靜態檢測常見的陷阱。如:引用空指針

    </li>

  • 讓 它比Java更簡潔,通過支持variable type inference,higher-order functions (closures),extension functions,mixins and first-class delegation等實現。

    </li>

  • 讓它比最成熟的競爭對手Scala語言更加簡單。

    </li> </ul> Kotlin 1.0 Beta 2 發布,此版本主要是 bug 修復和標準庫方面的改進。

    • 語言方面改進:類型參數強制約束 single-instantiation inheritance;改進 Diagnostics;改進編譯器

      </li>

    • 庫改進:為標準庫清理了 APIs

      </li>

    • 新文檔生成工具 Dokka

      </li> </ul>

      此外還有 IDE 方面的改進:

      • Completion now works for Java static members and members of objects. Just press Ctrl+Space for the second time:

        </li>

      • Completion inside string templates has been added. For using it type "$name."

        </li>

      • Now we can choose exact position of a breakpoint while debugging expressions with lambdas:

        </li>

      • And finally, a bunch of intention actions have been added for importing Java statics, object members and enum entries. And there is an analogous one to *-import static members from Java classes or entries from enum classes

        </li> </ul>

        更多內容請看發行說明


        來自:http://www.oschina.net/news/68109/kotlin-1-0-beta-2

         本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
         轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
         本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!