Kotlin编程

初涉Kotlin

2016-03-24  本文已影响150人  lnfg

Hello Kotlin!

大家都说:kotlin是Android世界的Swift

Kotlin 1.0 

欧耶,很好很好,要好好的研究学习下了。

目前其最新的版本是 Kotlin 1.0 。于2016年2月15日发表。

一:Kotlin 是什么?

      对呀,kotlin到底是什么呢?根据官方描述:

Kotlin is a pragmatic programming language for JVM and Android that combines OO and functional features and is focused on interoperability safety clarity and tooling support.

其可以运行于以下的工具(引用官方原句):

1.IntelliJ IDEA, Android Studio and Eclipse

2.Maven, Gradle and Ant

3.Spring Boot(Kotlin support released today!)

4.GitHub, Slack and even Minecraft

Kotlin的亮点在于:

One of the key focuses of Kotlin has been interoperability and seamless support formixed Java+Kotlin projects, making adoption easier leading to less boilerplate code and more type-safety. Additionally, Kotlin has anextensive standard librarythat makes everyday tasks easy and smooth while keeping the bytecode footprintlow. Of course,any Java library can be used in Kotlin, too; and vice versa.

好吧,Kotlin的介绍多得不要不要的。#—  。—#

二:特性

a.代码简洁(大大减少了你编程成本,减少代码量):

直接上图:

   简洁性

b.安全性(避免空指针等)

 安全性

c.Versatile(—。—多平台?????)


  多能

d.互操作性

  互操作性

e.工具支持


 工具支持

三:看下代码模样

直接上图好了,都是官网上的   O(∩_∩)O哈哈~

不喜勿喷!谢谢 O(∩_∩)O谢谢!!!!!!!

上一篇 下一篇

猜你喜欢

热点阅读