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

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
主站蜘蛛池模板: 绩溪县| 阳山县| 新乐市| 乐山市| 阳江市| 咸宁市| 五河县| 乌兰浩特市| 大新县| 浦东新区| 赤峰市| 威宁| 肥乡县| 镇沅| 屏南县| 三门峡市| 稷山县| 英山县| 丰宁| 泸溪县| 长岭县| 东兰县| 叶城县| 疏附县| 旬阳县| 雅安市| 额济纳旗| 伊川县| 姚安县| 亚东县| 当阳市| 通城县| 遂昌县| 海阳市| 淮阳县| 天门市| 松滋市| 武平县| 卢氏县| 桃江县| 珠海市|