preface

Time is always so inadvertently slip through the fingers, and came to the end of the day. The end is always nice, we can start chat mode, further talk about Go.

Today, we’ll focus on a simple comparison between Go and Java.

After comparison, we can better determine if we need to jump from Javaer to Goer.

Go!!

Java

Before we do that, let’s take a good look at Java itself. Let’s see what’s so fascinating about Java that we’ve been learning for so long, and it’s worth paying for.

The purpose of the Java

In summary, what our dear Java can do, roughly speaking, is this:

1. Server backend system development (Web backend, micro-service backend payment system, business system, management background, and various interface services for background interaction). 2. The underlying implementation of big data framework and Java API support. (Hadoop). 3. Low-level development of other middleware. (Tomcat, RocketMq, Hbase, Kafka(part), SpringCloud, Dubbo...) .Copy the code
The advantage of Java

Merit is what keeps a language on the charts. So, what are the advantages and features of Java?

1. The system performance is high as a server. 2. Available VMS, cross-platform. 3. Powerful function, support more class libraries, more ecosphere class libraries, development framework and tools easier to find. 4. High market share, about 60% of Chinese programmers are doing Java-related work.Copy the code

I think perhaps what I like most about it is its rich ecology. Ha ha ha ha, say not good to hear, can’t write code, check, large code with you!!

Go VS Java

The history of the Go

Here he comes, here he goesAccio!!

Yesterday, we talked about why Go was born. For those of you who haven’t, we can continue today.

Go language was developed by Google’s internal corporate leaders. The main reason is that Google has a large number of C program projects, but the development efficiency is low and the maintenance cost is high. Therefore, Go language was developed to improve the efficiency, and the performance is only poor.

(Go was developed in 2007 and released in 2009)

In September 2007, three of Google’s gods — Robert Griesemer, Rob Pike, and Ken Thompson — started designing. By the way, let’s talk about why a god is a god.

First up, Ken Thompson. That’s awesome. I think, if you know Unix, you know, he invented Unix, and then he invented C. In 1983, he won the Turing Prize and was an Academician of the United States. I have a wide range of interests and hobbies. Haha, in 2000, maybe the code was too simple for god, so I became a pilot. Later, maybe I went through a circle, maybe the code was interesting, and then I came back.

And then, Rob Pike, who is also a great guy, and Ken Thompson, who are both good friends, we could spend a lot of time talking shit together. They’re probably studying how the next generation of languages are created. And one of the inventors of Unix. At the same time, he is also a great amateur. He likes talk show, invented a telescope, and won an Olympic medal in archery. Something a little more casual would have been more of a hit. He was the designer of utF-8 code.

Finally, Robert is one of the designers of HotSpot for the JVM and the JS engine for Google Browser.

I mean, three guys like that, it’s not gonna work.

At a macro level, look at Go versus Java

It’s actually a little easier to talk about. Because the characteristics are quite distinct.

2.Go programs are directly packaged into files that can be executed by the operating system without VMS in the middle layer. Therefore, the execution efficiency is higher in theory (the actual situation needs to be analyzed). 3. Compared to the Java language and coding style, Go is more concise and can achieve the same function with less code. 4. The bottom layer of Go language is also implemented by C, and has made a high concurrency design, so the performance is high, the use of coroutine design, more awesome 5. It is naturally suitable for the development of some specific systems, such as blockchain system (such as ethereum underlying system, ethereum upper application), cloud computing and container (Docker, K8s underlying system is developed by GO) development, network programming (similar to Java Netty).Copy the code

conclusion

Today, talk about almost, feel under the awesome place, do a good contrast.

Next, we will learn more. Start.