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

Go native strategy

The Kotlin developers figured that the same strategy that is used on the JVM platform could be used on other platforms too. Consider the following illustration:

On no platform does Kotlin disrupt the platform's existing technology:

  • The JVM works with the Java bytecode and Kotlin gives an alternative to Java to generate the same bytecode (By no means is Kotlin the first alternative as there are already 200+ languages that work with JVM, but it is the most elegant one for all the reasons that we have seen previously).
  • On modern browsers where JavaScript is the de facto standard, Kotlin can work by transpiling to JavaScript. Again, this means that Kotlin is friendly with existing browsers without making any special effort.
  • On the Node.js platform where JavaScript is used on the server side, your Kotlin code transpiles into JavaScript, and hence there are no changes needed in the Node.js framework for Kotlin to run.
  • In a similar way, Kotlin/Native plans to work with other technologies in a native way. As we will see in Chapter 7, CSV Reader in Kotlin Native, Kotlin/Native will be used to generate Native code.

Since the platform's technology is not disrupted, there are zero changes needed at the platform level to adopt Kotlin. Kotlin's compatibility with a given platform can be taken for granted from day one. This eliminates a big business risk.

主站蜘蛛池模板: 高邮市| 闵行区| 唐山市| 乐至县| 富锦市| 荣成市| 平果县| 东兰县| 禄丰县| 通海县| 凤冈县| 阿合奇县| 邹平县| 濮阳市| 黄山市| 安福县| 西峡县| 北安市| 木里| 体育| 龙井市| 乌兰县| 长顺县| 广丰县| 阳泉市| 贡觉县| 黑龙江省| 唐山市| 马关县| 潼关县| 蒙城县| 涿鹿县| 新邵县| 新和县| 醴陵市| 谢通门县| 顺义区| 闽侯县| 巴东县| 迁安市| 法库县|