EASYKOTLIN
The Rise and Fall of JVM Languages
JVM 語言的興衰
安德魯 Binstock 2017年4月3日
一個可行的商業模式是一門語言成功與否的關鍵。
在過去的18月里, 我們在 Java 雜志上報道了各種有趣的 JVM 語言--從眾所周知的到晦澀難懂的。毫無疑問, 我們可以繼續這樣做兩年, 而不涉及相同的語言兩次。這在許多方面都是 JVM 的榮耀: 它是語言后端的一個很好的平臺。
JVM 的好處包括性能、廣泛的可用性和熟悉度、優秀的工具和完整的文檔。此外, 還有一個高度的信心, 即 JVM 將繼續被廣泛使用, 因此依賴于它的語言不會突然需要一個新的平臺 (例如, 目標是 Adobe Flash, 被迫做的)。
jvm 語言通常分為兩大類: 那些是現有語言的端口 (如 Ruby 的 JRuby 端口和 Python 的 Jython 端口), 以及從底層構建的 jvm (Groovy、Kotlin、Scala、Golo、影和其他許多)。.那些在后者小組經常位置自己作為改進的選擇 Java 語言。事實上, 這些語言確實提供了 Java 沒有實現的特性或語法--通常是出于特定的原因。其他時候, 這些語言導致 java 采用了一些特性, 在這種情況下, java 團隊在制定自己的功能時就有了檢查這些實現的好處。甲骨文認為, 這一對話的價值在其長期生產的 jvm 語言峰會上是很明顯的, jvm 語言設計者們聚集在一起, 在他們自己和 Java 團隊成員之間進行比較。
由于我們對 JVM 語言的長期報道, 我偶爾會問他們中哪一個會變得足夠受歡迎, 以 "跨越鴻溝"。這一術語起源于杰弗里. 摩爾同名的書, 指的是受歡迎程度的提高, 這一技術從遠見者和早期采用者的專屬領域進入了實用主義的更廣泛的懷抱, 尤其是商業。我相信只有三種語言能夠進行這一跨越, 或者已經這樣做了: Groovy、Scala 和 Kotlin。
Groovy 發現成功是一種古怪的腳本語言, 它填補了許多需要快速但有表現力的編碼的利基。它是許多測試框架的腳本語言, 用于在 Gradle 中編寫生成腳本。它在主要的 JVM 語言 (上面提到的三和 Java) 中也是獨一無二的, 因為它不需要公司的贊助才能變得流行起來。(雖然關鍵的支持了幾年, Groovy 是很受歡迎的, 在關鍵的收購, 并繼續從關鍵停止贊助。這證明了該項目的長期領導人紀堯姆. 的社區技能。
今天, 沒有任何一種語言能夠像 Groovy 那樣越過鴻溝, 那就是沒有嚴重的財政支持。寫一門語言是一個非常昂貴的命題, 就像推廣它一樣。在最初的學術創作中, Scala 得到了初創類型的支持, 直到該公司意識到--與 Groovy 一樣舉足輕重--在銷售一種新的語言方面沒有收入可言。因此, 類型更名為 Lightbend, 并重新調整其 nonlanguage 產品的重心。從 "Scala 公司" 的突破是如此的干凈, 宣布改名的新聞稿甚至沒有提到聲明正文中的語言。就像我說的, 語言里沒有錢。
Kotlin 依賴于一個相當不同的模型。該語言的設計部分是為了 JetBrains 的內部使用。它的設計是務實的, 旨在幫助公司降低成本, 開發其廣泛的開發工具線。發展和促進 Kotlin 的好處大于其成本, 關鍵的是, JetBrains 從 Kotlin 以外的產品中獲得收入。然而, 費用是重要的。據安德烈 Breslav 在 JetBrains, 超過二十幾個專職的發展和促進 Kotlin。
在這個過程中, Kotlin 已經演變成了一個 JetBrains 的效率工具。其強烈的務實取向強烈地回響著一個重要而活躍的社區, 它加速了它跨越鴻溝的運動。Kotlin 從而使 JetBrains 能夠將新的開發人員帶入其工具生態系統。但是不斷增長的用戶群也給公司帶來了成功的語言經常面臨的挑戰: 管理用戶的需求與公司自身對語言的欲望。
由于經濟學支持 Kotlin 的進化和 JetBrains 對開發者的長期知識將幫助它與社區合作, 我希望在未來幾年內 Kotlin 將完全跨越鴻溝, 并成為一個-或可能是主要的非 Java JVM語言, 從而再次證明了 JVM 生態系統的健壯性。
安德魯 Binstock, 主編
The Rise and Fall of JVM Languages
Andrew Binstock
Apr 3, 2017
A viable business model is key to language adoption.
For the last 18 months, we at Java Magazine have been covering all sorts of interesting JVM languages — from the well known to the obscure. There is no doubt we could continue doing this for another couple of years without covering the same language twice. That’s in many ways the glory of the JVM: it is a great platform for language back ends.
The benefits of the JVM include performance, wide availability and familiarity, excellent tools, and thorough documentation. In addition, there’s a high level of confidence that the JVM will continue to be widely used, so languages that depend on it won’t suddenly need to ind a new platform (as those that targeted Adobe Flash, for example, were forced to do).
JVM languages generally fall into two major categories: those that are ports of existing languages (such as the JRuby port of Ruby and the Jython port of Python) and those that are built from the ground up for the JVM (Groovy, Kotlin, Scala, Golo, Fantom, and many others). Those in the latter group often position themselves as an improved alternative to Java the language. And indeed these languages do provide features or syntax that Java has not implemented — often for specific reasons. Other times, the languages lead to Java’s adoption of features, in which case the Java team has the benefit of examining those implementations when formulating its own. That Oracle sees value in this dialogue is apparent in its longtime production of the JVM Language Summit at midyear, where JVM language designers come together to compare notes among themselves and with the Java team members.
Because of our long coverage of JVM languages, I am occasionally asked which of them will become popular enough to “cross the chasm.” This term, which originated in Geoffrey Moore’s book of the same name, refers to an increase in popularity that drives a technology from the exclusive domain of visionaries and early adopters into the wider embrace of pragmatists and especially of businesses. I believe there are only three languages that are capable of this crossing or have already done so: Groovy, Scala, and Kotlin.
Groovy found success as a quirky scripting language that has filled numerous niches where quick but expressive coding is needed. It is the scripting language for many testing frameworks and is used for writing build scripts in Gradle. It is also unique among the primary JVM languages (the three mentioned above plus Java) in that it did not require corporate sponsorship to become popular. (Even though Pivotal did support it for a few years, Groovy was popular long before Pivotal’s acquisition and has continued to be since Pivotal stopped sponsorship.) This is testament to the community skills of the project’s longtime leader, Guillaume Laforge.
Today, no language can hope to cross the chasm as Groovy did — that is, without serious financial backing. Writing a language is a very expensive proposition, as is promoting it. While originally an academic creation, Scala was backed by the startup Typesafe until the company realized — as Pivotal did with Groovy — that there is no revenue to be made in selling a new language. As a result, Typesafe changed its name to Lightbend and refocused on its nonlanguage products. The break from being the “Scala company” was so clean that the press release announcing the name change did not even mention the language in the body of the announcement. As I said, there’s just no money in languages.
Kotlin relies on a rather different model. The language was devised in part for JetBrains’ internal use. Its design is pragmatic and aimed at helping the company reduce costs in developing its extensive line of developer tools. The benefits of developing and promoting Kotlin outweigh its costs and, crucially, JetBrains derives its income from products other than Kotlin. The costs, however, are significant. According to Andrey Breslav at JetBrains, more than two dozen full-time equivalents are developing and promoting Kotlin.
In the process, Kotlin has morphed into more than just an efficiency tool for JetBrains. Its intensely pragmatic orientation has strongly resonated with a significant and active community, which accelerates its movement across the chasm. Kotlin thereby enables JetBrains to bring new developers into its tool ecosystem. But the growing user base also presents the company with the challenge that successful languages often face: managing the demands of users versus the company’s own desires for the language.
Because economics support Kotlin’s evolution and JetBrains’ longstanding knowledge of developers will help it work with the community, I expect that within the next few years Kotlin will fully cross the chasm and emerge as a—or possibly the—primary non-Java JVM language, so proving yet again the robustness of the JVM ecosystem.
Andrew Binstock, Editor in Chief
javamag_us@oracle.com
@platypusguy
KotlinChina編程社區 微博
《Kotlin極簡教程》正式上架:
點擊這里 > 去京東商城購買閱讀
點擊這里 > 去天貓商城購買閱讀