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

Why not use Java?

One of Java's greatest strengths is the ability to write once, run anywhere (WORA). This is incredibly valuable if you have to do anything involving GUI, graphics, or audio. Go certainly does not beat Java in its ability to create GUIs, but it is cross-platform and supports cross-compiling.

Java is mature and widely adopted with lots of resources available. There are more options with Java libraries than Go packages. Java is the more verbose of the two languages. The Java ecosystem is more complex with several options for build tools and package managers. Go is much simpler and more standardized. These differences could simply be attributed to the age difference between the languages, but it may still affect your language choice.

In certain situations, the Java virtual machine (JVM) can be too resource intensive in terms of memory or startup time. If you need to pipe together several command-line Java applications, the startup time for the JVM just to run a series of short-lived programs can be a significant performance hit. In terms of memory, if you need to run several instances of the same application, then the memory required to run each JVM can add up. The JVM can also be restricting since it creates a sandbox and limits your access to the host machine. Go compiles down to native machine code and thus has no need for a virtual machine layer.

Go is well-documented and the community continues to grow and provide more resources. It is an easy language to learn, especially for experienced programmers. Concurrency is a bit simpler and built into the language, as opposed to a library package.

主站蜘蛛池模板: 蕉岭县| 乌兰察布市| 丹寨县| 东辽县| 行唐县| 高安市| 新津县| 孝感市| 同江市| 勃利县| 广汉市| 吴忠市| 綦江县| 建瓯市| 江都市| 静宁县| 遂平县| 阿克| 朝阳区| 宁河县| 芦溪县| 邵阳市| 昭觉县| 敦化市| 前郭尔| 龙口市| 平遥县| 美姑县| 合水县| 铁岭市| 吉首市| 临夏市| 翁源县| 澄迈县| 赞皇县| 准格尔旗| 芜湖县| 马边| 高淳县| 绥棱县| 徐汇区|