Google: Five reasons to choose the Kotlin

Author | Christina Cardoza
translator | Kenneth Lau
in the field of software development, every year the emergence of a new programming language, but in the past few years, they rarely receive attention as developers like JetBrains of Kotlin.

Kotlin is a universal, statically typed programming language designed for JVM, Android, browser and local solutions and design. It is created by JetBrains language designer Andrey Breslav, 2011 officially released by the JetBrains.

Today, Kotlin has become one of the most popular language on Stack Overflow, the programming language one of the fastest growth in GitHub, the preferred language is Android application development. Kotlin and also because of the rise of cross-platform tools, unveiled at this year's Thoughtworks radar technology (Technology Radar).

Rebecca Parsons ThoughtWorks chief technology officer, said, "Those developers who have not yet understood Kotlin best to see what it can do absolutely .Kotlin is a really good programming language, with a solid characteristics and ecosystem evolving."

However, in such a short period of time, Kotlin why and how to attract so many developers interested in it? According Thoughworks technical director Fausto de la Torre said, first of all, Kotlin is open source, which in most software development community struck a chord. Secondly, Kotlin is also supported by one of the industry's top technology giants: Google announced support for this programming language in the 2017 Google I / O conference. However, even before Google announced the decision, there were already many developers to transfer their work to develop the Kotlin.

According to Google Android Chief Evangelist said Chet Haase, Kotlin broke too many traditional programming language has been accepted mode. "Anything may have resulted in unwieldy situation." He said, "A few years later, those programming language provider does not want to completely change the status quo, with the new paradigm programming language, imposed on developers not ready . "this is also considered a problem in Google Kotlin major concern. "We (do not) want to let Android developers were shocked to enable them to change everything by introducing some new concepts." Haase explains.

Kotlin takes a different approach, as it is fully interoperable with Java, allowing developers to use Java Kotlin libraries and frameworks of existing ecosystems.

1
Kotlin comparison with other languages
, however, ThoughtWorks of Fausto de la Torre explained that this interoperability, for Kotlin is likely to be a compromise. Because most developers are using Kotlin Java developers, they tend to be written in Java style Kotlin code, but in the use of Kotlin, there are some Java behavior, keywords, and functions are not well converted. "Kotlin can use the entire Java ecosystem, which is one of the most powerful things it owns, but trying to use it in the same way, but it is a challenge." He said, "You can not as you think as straightforward to use it. "

Stephanie Cuthbertson Android and Google's director of product management believes that, Java is no longer the most advanced programming language. About half of the Android development community is using Kotlin, because it offers more modern features. When you look at other languages ​​Android ecosystem, you will find, C ++ and Java technology on behalf of a certain level within a certain time. For example, C ++ data structures and algorithms representatives, and representatives of Java object-oriented language, such as the introduction of things like automatic memory management; however, Kotlin represents a more modern way of working, Cuthbertson's explanation. "Developers are telling us that they like all modern idiom of Kotlin." She said. Some examples include: coroutine (coroutines) and nullability (nullability). Coroutine introduces a new way to write asynchronous and non-blocking codes. Kotlin also supports explicitly declared null, and to ensure that developers do not experience may lead to quality problems null reference exception.

Cuthbertson also believe that compared with other languages, the language faster pace of development, because Kotlin language is not driven by the Commission, but the language itself is designed to complete the Kotlin Foundation is managed by a programming language designed by the master of Breslav . Breslav community has been responsible for a process, in this process, he received a lot of comments from other developers out there, but he was the only person responsible for this process. Cuthbertson said: "This means that the language is in a manner consistent with the rapid development of .Kotlin language is by design, so we can quickly evolve, but evolutionary way to protect the purity of the language, but in a truly healthy way to accept the views of the community. "

In addition, Android's Haase explains, Kotlin advantage is that it is designed and developed by the company IDE JetBrains. "The core features of the language as well as new features tightly integrated development environment for developers to use. Although other languages ​​are very good at using the IDE to develop this specific language, but the language itself is independent of the IDE." He explained that, IntelliJ IDEA is Google's IDEAndroid Studio of the underlying platform.

Thouightworks of Fausto de la Torre found his team was attracted Kotlin, because it improves developer productivity and provide a better experience than other development languages. He explained that, Kotlin ability to achieve the same function with other languages, but with a more modern way, with fewer lines of code to achieve.

Cuthbertson said: "Once you get the hang of Kotlin write code, you can write less code, the less the code, the easier maintenance due to reasons such as emptiness like, you can have a higher quality code. and because modern idiom, it becomes much more interesting. "

Fausto de la Torre added that, Kotlin community there is no other language is so powerful. "Although it continues to grow, but not mature enough, there are still some gaps to be filled." He would like to see more testing framework and sustained delivery of the frame. Google is currently working on community investment and development, and provide training to help developers learn how to Kotlin code and integrate their solutions. "We do not believe this to our developers better, but we also believe that this approach for us, but also better." Haase explains. Google Android Jetpack presently being used in libraries and other Kotlin write.

2
Kotlin not just for Android development
at present, because of the rise of Kotlin in the field of Android application development is known, although Google is still investing heavily in other languages, but it is also promoting the development of Kotlin. "If you're working on a new project, we recommend you start from Kotlin. We began to use the Android operating system 'Kotlin first' approach." Android's Cuthbertson said.

But ThoughtWorks' Fausto de la Torre believes that this language demonstrates its value beyond mobile development.

ThoughtWorks the current situation to see that the team uses to build micro Ktor service and software deployment into the production environment, Ktor is a step in the use of Kotlin build server and client framework. MockK is another solution for analog and Kotlin Kotlin test applications. "As a local library, it helps our team to write clean and simple code to test Kotlin applications, such as image instead of using Mockito or PowerMock inconvenient wrapper." ThoughtWorks wrote in their radar technology. In addition, ThoughtWorks use Detekt static code analysis in Kotlin, use http4k to use the service and the HTTP service in Kotlin in.

Kotlin team is also committed to the field of the Kotlin language other than mobile application development by Kotlin / Native, which is a virtual machine without running the solution can be compiled into native libraries Kotlin code. "Kotlin / Native platform mainly for those who do not need or can not use virtual machine (such as embedded devices or iOS) design. It addresses the need to develop a developer when no additional programs to run or independent virtual machine problems. "JetBrains wrote on the site. Kotlin / Native currently supports iOS, MacOS, Android, Windows, Linux and WebAssembly.

Google also tries to cloud development through the use of Kotlin, the Kotlin introduced outside the realm of Android development.

In a Kotlin Consensus JetBrains recently released report, the company found that 39 percent of respondents use Kotlin as their primary language, 46% of respondents Kotlin production code for the server-side, 10% of respondents those who use it for scientific data. The report is more than 4,000 parts Kotlin user based on the generated reply. "Today, more than 200 million people use on a variety of platforms Kotlin, for the development of all possible types of software. There are more than 250 contributors to help promote the development, but also help the ecosystem forward. Our dedication to the community and hard work are very happy. they made a great contribution to the Kotlin Kotlin learning materials and disseminated knowledge. "Kotlin team wrote in a blog post.

3
Google uses Kotlin Five reasons
for developers, using a new programming language on the platform of existing and established may make them feel surprised, because it will in existing applications, libraries, code, forming a disconnect between environment, a new language and a new API.

Android Chief Evangelist Chet Haase said: "whether the platform should be in another language, it has always been a consideration, due to the shock effect, the answer is always negative, however, when we want developers to put forward the idea of ​​Kotlin, they are very grateful. interest."

Stephanie Cuthbertson, director of product management for Google's Android said that Google announced in 2017 to promote the main driver support Kotlin of five.

"This is a nice programming language," Cuthbertson said. Because it is a modern programming language, so he takes advantage of developers already familiar with many of the new best practices.

Kotlin is fully interoperable with Java, it allows developers to call back and forth between different languages.

mature. When Google decided to use Kotlin, it has been born five years, and has reached stability 1.0.

IDE support. Kotlin was created by the JetBrains IntelliJ IDEA (Android Studio underlying platform) creator, so it provides enhanced support for IDE and language.

community. Cuthbertson said, "We will Kotlin applied to the Android, because the community really needs it." In fact, Cuthbertson explained, shortly before it announced the adoption of Kotlin, Android community had to write an open letter in Google, requirements team used Kotlin.

Cuthbertson said: "Kotlin and not just in development, people really liked it, it is because of a series of things, so we have to break the balance, and said: 'It is time forward.'"

English original
https://sdtimes.com/softwaredev/the-rise-of-kotlin/

Extended reading: Java out of favor, Google announced Android Kotlin is now the preferred language development

  Dalian good Women's Hospital mobile.dlbh120.com

  Dalian look good Women's Hospital mobile.dlbhfk.com

Guess you like

Origin blog.csdn.net/qq_42894764/article/details/93617811