It's time to answer the question [Why should I learn Go language (golang)]

Presumably everyone asks themselves before learning something new: "Why should I learn this?"

Just like we read 四大名著, only after you have read it 四大名著, you can take a closer look at China's thousands of years of history 天下大势合久必分,分久必合, and moreover, it is to gather with a few friends, and you will tell the interesting things you encountered during your commute. , and you apply it 说时迟,那时快, all of your friends are suddenly tongue-tied and staring at you, not missing any details, and let you finish this interesting story.

Well, some people said disdainfully: " 四大名著I haven't read it much, is it possible that this has something to do with why I want to learn Golang?"

Of course it doesn't matter, I didn't read all of them 四大名著, except that 红楼梦I only watched the first five chapters, and the rest such as 三国演义, 水浒传, 西游记.

In fact, 四大名著it is beneficial and harmless for the individual to be familiar with it, and golangthe reason why I want to study is the same.

I should be preparing to learn Golang, so I have to explain why I want to learn it? Could it be just to 秋码记录(qiucode.cn)refactor the ? No, this is not the case, although I wrote down records while learning golang, there are 34 articles according to the number of articles, exactly: " 满纸荒唐言,都言作者痴。一把辛酸泪,谁解其中味。".

And those 34 articles cover the basic grammar of golang. Although the golang version uses 1.19, it fails to describe the new functions that appeared as early as golang 1.18 in those 30 articles 泛型.

The reason why I want to learn golang is not just for refactoring 秋码记录(qiucode.cn), if that is the case, why bother to learn a new programming language?

It prompted me to learn golang because it 区块链is 主要语言, please pay attention to the wording here, the Chinese are cautious about the description of words.

In addition to 区块链including golang as the main development language, there is a reason, not because golang inherently supports many features such as concurrency. And the ones we are familiar with 虚拟化容器, docker, k8sare all developed using golang.

以太坊The client also uses golang, although there are clients in other languages.

Most domestic blockchains are also dominated by golang, although all of them are domestic 联盟连.

区块链According to the degree of data openness, it can be divided into: 公(有)链, 联盟连, 私(有)链.

Public chain : It is a type of blockchain with the highest degree of open data. Any person, organization/institution can participate, and all data records on the chain are open and transparent, and anyone can agree with it. The process is not controlled by any institution, and it is a completed blockchain 去中心化. The outstanding representative is 比特币, 以太坊yes.

Alliance company : It is jointly participated by multiple trustworthy organizations and has a good cooperative relationship with each other. The openness of the consortium chain is between the public chain and the private chain, and the writing and modification permissions are still in the hands of multiple mutual trust organizations, and it is regarded as a partially decentralized blockchain. This alliance can be a country-to-country alliance, or a kind of alliance between enterprises and enterprises, banks and banks. The participants of the alliance chain have a high degree of trust in each other, the verification efficiency is fast, and the transaction cost is greatly reduced compared with the public chain. At the same time, some privacy of data can be well protected. The information and resources on the alliance chain can only be shared by members of the alliance. Well-known alliance chains such as R3区块链联盟.超级账本

Private chain : also known as the internal chain, its degree of openness is very low, and the authority to write and modify data is only in the hands of a few people/organizations, and it belongs to a single-center network of private institutions. At present, many large company groups are developing their own private chains, which can be used for enterprise management, financial audit, bank settlement and so on.

Whether it is a public chain, a private chain, or an alliance, golang is the main development language of the blockchain.

Through the above explanation, we know that golang can be applied in web后端服务, 区块链, 云计算and other fields.

Although some people said that there are deficiencies in golang, there are no classes, and there is a lack of generics. As for the generic function, golang also added it in 1.18. As for the class, can it be used 结构体instead!

Every language has its advantages and disadvantages. You can't use the functions in another language to question why golang doesn't have it. The most powerful complaint about golang is that it doesn't have exception handling. Isn't this the comparison with other languages?

Guess you like

Origin blog.csdn.net/coco2d_x2014/article/details/128155836