Because xiaobian recently wrote two sets of tutorials, respectively Java language basic tutorial and Go language basic tutorial, and these two languages, xiaobian has also been useful in the actual work

And www.helloworld.net community background, is written in Go language, and it is xiaobian responsible for. Besides, xiaobian works in Java.

Therefore, I have a relatively good understanding of these two languages, so this article will talk about my feelings and views on these two languages

In addition, let’s talk about the experience of various programming languages in the past 10 years

The views expressed in this article are for reference only

I don’t want to start a debate between good and bad language.

Xiaobian C++ development experience

When I first graduated, I did C/C++ development, mainly research and development of Windows desktop software. Used Microsoft MFC, WTL also used Qt cross-platform framework

Anyone who has learned about C++ desktop software development knows that C++ interface writing is very painful, there is no good interface library, MFC ugly, complex, WTL interface framework

However, it is also difficult to achieve a beautiful interface, and later I also came into contact with Qt and self-drawn UI framework, in general, C++ development desktop client software, really no front-end cool, very painful.

Instead of focusing on your business, you spend all day thinking about how this button will work and how the text in that edit box will be vertically centered. In short, thankless work.

Besides, C++ is not only easier to draw interfaces than other terminals (such as front-end, android, IOS), but also common libraries are not as complete as them. Many have wheels.

Even every C++ developer has his own set of String manipulation utility classes, whereas in Java, a String class is all set.

I worked in C++ development for 3 years. However, with the rise of android phones, more and more software began to have android versions, and android became more and more popular at that time.

Thinking of C++ desktop software development may be lonely, so, with the help of my classmates (android development), xiaobian switched to android development career.

Xiaobian’s Android development experience

Because the university is a computer major, in the university, I learned C/C++, also learned Java, so, switch to android, is not too difficult. Maybe even a little surprised.

I remember one thing deeply. When I was doing C++ development, I parsed json strings. I forgot which library I used at that time.

You need to manually parse key by key to obtain the value.

When I was doing Android development, my classmate told me that there was a Gson library, which could directly convert JSON strings into corresponding classes or classes into strings

When I saw this feeling, it was so cool to write things in Java. There are so many libraries, so many things do not have to worry about, after C++ to android, writing Java is a cool thing

Feeling from the primitive slash-and-burn era, to the modern era.

Suddenly, after six or seven years of android development, Java is now used, not to say expert, at least an advanced level, with the development of the Java language

Also slowly feel that Java is good, but there are some not too good places.

The Java language is verbose, and modern languages like Dart, Go, Swift, which came later, are simplistic.

The syntax is simple and comfortable to write. Java although in Java 10 also has the var keyword, definition variables no longer need to write smelly and long, but now the most used is Java8

There are also Java virtual machines, which cause particular resource consumption.

For example, the whole solution of Java Spring, some people jokingly called configuration engineer, want what function, just need to configure. (If you remember how to configure it or know how to search)

You can see how mature Java Spring is, but it also brings with it black box operations, and a lot of people just know configuration, not how it works

What does it compile? Is it an executable file? Can it be jar package? Where are the LISTENING IP addresses and ports written? Where is main?

Many people who are beginning or even doing Java for 5 or 6 years (mostly with Spring) have no idea how this works

The benefits of Java at the time were enormous, and The Spring suite offered a basket of solutions that were most stable for enterprise development

Domestic Ali, JD and other companies are using Spring on a large scale. Spring has almost become the pronoun of Java

For smaller companies, 99% of all Java development options are Spring

Of course, xiaobian is to do Android development, not do Web development.

Later, I got involved in Web development because I wanted to build a developer-only technical community, which is the website www.helloworld.net mentioned at the beginning of this article

This led to an intersection between xiaobian and the later Go language

Xiaobian and Go language development experience

Speaking of Go, the HelloWorld developer community (www.helloworld.net) came up with the idea of a developer-only tech community back in 2018

When selecting the technology, the first thing to decide is, what language is written in the background? In what frame?

In Java, in SpringBoot, which actually appeals to me. At least if there is any problem in the future, this set has corresponding technical plan.

But at the same time, I also searched some articles related to Go language on the Internet. Because I have learned about Go language in my spare time before, I know that Go language has some great features.

For example: concise syntax, function return multiple values, natural support for concurrency, use of channels for synchronization and co-communication between multiple coroutines, rich network programming interface

Of course, some people criticize Go for not having generics. In fact, I personally think this is a good point, because when I do C++, generics are really hard to understand, and the code written by generics

It’s also really obscure, especially the source code in the STL.

In Java, generics are a little simpler than in C++, but they are still too difficult to understand, so I prefer to write more functions than generics because they are too much of a brain.

Swift has abolished the ++ operator. Because ++ can be used before ++ I, or I ++ can be used after, and it doesn’t mean the same thing

So, as a programming language, it’s all about the idea behind the design, and Swift says there’s no need to do this, so why bother telling the difference

So in Swift, I = I + 1 is the only way to use it (older Versions of Swift still have the ++ operator), which I think is a good mind-freeing design.

Because if you add before you add after you add, you can distinguish, you can’t distinguish, you can’t react, you can’t react.

To digress, speaking of www.helloworld.net developer community, finally all kinds of materials to learn Go, also have access to gin, Iris and other frameworks, at least with Go to write web programs

The language itself supports, provides an interface, net package provides a fairly rich interface for writing web, and gin, Iris and other Web frameworks, encapsulation is not very deep

That’s exactly what I needed: I didn’t want something so wrapped up that I didn’t know how it worked just by configuration

But I don’t want the most primitive, encapsulating nothing, so I think gin and Iris is exactly the framework I need.

The other reason is that Go compiles a single executable file, throws it on a server and it runs and provides services

You don’t even have to install nginx. And then just provide the 80 service, which is almost nothing to install on the server as opposed to Java, right

Compile an executable file, command line execution, OK, this is too o&M friendly. No need to install Tomcat, no need to install JDK, no need to configure the environment, no need to install Nginx

That’s what attracted me the most

Also, Go language development efficiency is quite high, the performance is also very high, known as the 21ST century C language

So in the end, Go was chosen as the backend language for the www.helloworld.net developer community

Java vs. Go

This topic is most likely to lead to language debate, because programmers themselves have a very skilled tool, for example, some people use JAVA for many years, very comfortable with the use of the tool

For example, some people only have contact with Go, and always say that Go is good. In fact, these are unfair. At a minimum, you need to be fluent in both languages and have hands-on project experience.

In fact, there are good and bad languages. This small editor thinks it exists.

Java and Go, now a lot of debate, Java more than 20 years of history, various frameworks, libraries, solutions are very mature, and the performance is not poor

Is now the preferred language of many enterprises, but it does not deny that Java has some problems, and these problems, in Go, may not be.

The Go language, promoted by Google and used internally, must have emerged to solve some problems

But it came later, with libraries and solutions that are not as rich as Java.

So, now the two languages can not replace each other. However, in my opinion, the future of server-side programming must be the future of Go

The battle between Java and Go is now like the battle between Java and PHP

History is always surprisingly similar, time will answer everything. Just our quiet testimony.

For now, at least, there is no shortage of work in either language.

C++ to Java, to Go, how do you feel

As an experienced person, the first feeling may be that C++ is thankless. C++ and Java, front-end, android may have the same salary, but the heart of C++ is more tired

Java is really good, top student, sometimes you can’t find anything wrong with it. There are some bad things, but nothing substantive

Go I really like, have written Go, will have such a feeling, this language to write cool, but Go third-party library, or a little more rich

I have 10 years of development experience in c++, Java and go. I also wrote front-end (vue) for a period of time. In between, I started my own business for a year and wrote PHP for a year

Generally speaking, language is just a tool, and it’s good to use tools correctly to solve problems

However, when there are multiple tools to solve the same problem, there will be some good and some bad, some to take and some to give up, among which the choice will be understood by those who know

If you’re a student, if you’re new to work, if you’re working on the back end, I suggest you definitely look at Go

If you’ve been working for years, it doesn’t really matter which language you believe in