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

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.

主站蜘蛛池模板: 永和县| 呼和浩特市| 铜川市| 西乡县| 桐城市| 葵青区| 台山市| 白河县| 锡林郭勒盟| 吉隆县| 大同市| 安丘市| 县级市| 巴林右旗| 县级市| 大余县| 启东市| 囊谦县| 灵丘县| 岫岩| 兴海县| 平谷区| 司法| 琼中| 宜阳县| 普安县| 乾安县| 从化市| 永城市| 石屏县| 甘孜| 靖远县| 平凉市| 渝中区| 伊川县| 海口市| 伊宁市| 拉萨市| 普安县| 拉萨市| 健康|