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

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
主站蜘蛛池模板: 沈丘县| 若尔盖县| 清涧县| 延津县| 江源县| 鄂温| 罗定市| 尼勒克县| 徐闻县| 垦利县| 博客| 西充县| 若羌县| 鄢陵县| 桦川县| 胶南市| 洱源县| 荔波县| 浮梁县| 石城县| 垫江县| 晴隆县| 古田县| 台江县| 共和县| 二连浩特市| 堆龙德庆县| 河间市| 虞城县| 徐闻县| 富锦市| 巴里| 大安市| 康保县| 康平县| 岫岩| 津市市| 汉寿县| 颍上县| 满城县| 绥阳县|