官术网_书友最值得收藏!

Why Kotlin?

Before we start our journey, we will answer the question from the chapter title--Why Kotlin? Kotlin is a new programming language developed by JetBrains, the company that developed IntelliJ IDEA. Kotlin is concise and understandable, and it compiles everything to bytecode just like Java. It can also compile to JavaScript or native!

Kotlin comes from professionals of the industry and solves problems programmers are facing every day. It is easy to start and adopt! IntelliJ comes with a Java to Kotlin converter tool. You can convert Java code file by file and everything will still work flawlessly.

It is interoperable and can use any existing Java Framework or library. The interoperability is impeccable and does not require wrappers or adapter layers. Kotlin supports build systems such as Gradle, Maven, Kobalt, Ant, and Griffon with external support.

The most important thing about Kotlin, for us, is that it works perfectly with Android.

Some of the most impressive Kotlin features are as follows:

  • Null safety
  • Exceptions are unchecked
  • Type inference works everywhere
  • One-liner functions take one line
  • Generated getters and setter out of the box
  • We can define functions outside of classes
  • Data classes
  • Functional programming support
  • Extension functions
  • Kotlin uses Markdown instead of HTML for API documents! The Dokka tool, a Javadoc alternative, can read Kotlin and Java source code and generate combined docs
  • Kotlin has a better generics support than Java
  • Reliable and performant concurrent programming
  • String patterns
  • Named method arguments
主站蜘蛛池模板: 巧家县| 怀安县| 武胜县| 常德市| 江华| 朝阳区| 乌拉特中旗| 襄樊市| 柳江县| 沿河| 航空| 满城县| 阿拉善左旗| 陈巴尔虎旗| 芮城县| 伽师县| 灵璧县| 农安县| 靖安县| 海盐县| 饶河县| 白山市| 海原县| 曲阳县| 洛浦县| 宝兴县| 利津县| 台安县| 任丘市| 泰宁县| 麻阳| 青岛市| 扶风县| 响水县| 东源县| 容城县| 禹州市| 甘肃省| 神木县| 苍南县| 富宁县|