Cloud computing era, I and go language difficult to understand the fate of

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.


Source: http://www.ituring.com.cn/article/14092


Wen/Xu Xiwei

I made a statement in Sina Weibo, go language programming: Go language will be more than C, Java, the next decade to become the most popular language.

              

At the 2nd session of the ECUG conference in 2007, I referred to my judgment on the future of the software industry: storage and computing will be transferred to the service side, and PC stand-alone to powerful servers + multiple terminals. This trend judgment has a real impact on my career.

From the business point of view, because of this judgment, I chose to set up Jinshan laboratory to study cloud storage technology; it also prompted me to focus on Erlang, a domain-oriented language for distributed programming, which prompted me to hold a session of the ECUG Congress; To encourage me to join the Grand Innovation Institute, to launch the Xiangyun project (Grandcloud predecessor), make a grand network , prompting us to set up seven cows, with seven cattle cloud storage.

Technically speaking, it prompted me to abandon nearly 10 years of desktop development experience and turn to server-side development. As I suggested in "Why I chose Erlang":

要么不写程序,要么就写服务器端程序;当然,你也可以去撰写移动终端设备上的代码,在PC平台上做开发的空间很小。

At the Jinshan lab, I chose the Java language and actively focused on the Erlang language, conducting small-scale trials, and evaluating the feasibility of large-scale use. My conclusion is:

Erlang风格的并行思想真的很棒;Erlang语言优势与劣势同样明显,这门语言不适合规模化推广使用。

The difficulty with Erlang is that it is the FP language. We lack the popular FP programming theory. We do not understand the FP "data structure" study. This is the threshold that the Erlang language cannot surmount, decides that it can only be the minority language.

After entering the Grand Innovation Institute, I chose C + + because I personally prefer C + +, which is very uninterested in Java's design philosophy. In the love of Erlang's parallel thinking, I created a project called Cerl, which took the Erlang model for C + +, indicating that I wanted to move Erlang's parallel programming model to C + + to reduce the burden of distributed programming.

After touching the go language, I found that the concurrent programming model of Cerl 2.0 is actually a prototype version of the Go language concurrency model, which is identical in concept.

Seven Cattle Company was founded at the end of May 2011, we chose the go language as the main language of the seven Qiniu storage server. The go language and even grammar were not yet fully stabilized. Why am I so determined to believe that choosing the go language is not a mistake, and that the go language will be the most popular language of the next ten years? In addition to the concurrent programming model of Go language won my heart, the various grammatical features of go language are so thoughtful, extraordinary, and its understanding of software system architecture, bring me surprises everywhere.

The go language gave me the first surprise, is the interface. Of course, I didn't accidentally go to the non-intrusive interface. In the interface (or contract) expression, I always think Java and C # these mainstream static type language are going in the wrong direction. C + + templates are in the right direction despite the complexity of the mechanism. But the interface of Go language is not so simple as non-intrusive interface, it is the outline of the Go language type system. In addition to advanced features such as reflection support, the Go language also supports interface queries.

The second surprise of the go language was the extremely simplified but complete "object-oriented programming" approach. The go language discards a large number of OOP features, such as inheritance, construction/destructor, virtual functions, function overloading, default parameters, and so on, simplifying the control of symbolic access rights, changing the hidden this pointer to an explicitly defined receiver object. Let me see that the core value of OOP programming is simple-it's just that most people can't read it.

The go language brings me a third surprise, which is its function of multiple inverse values and error handling specifications. function multiple return value it is easy to think that only the input and output of the function can be clearly presented, the semantic expression will be clear enough. But what I didn't think about was that go introduced the built-in error type and the defer keyword to write the exception-safe code that makes people simply astounding.

The go language brings me a fourth surprise, which is its function of cohesion. One of the most typical cases is the combination of the Go language feature. For most languages, a combination is simply the basic means of forming a composite type. But the go language introduces the concept of anonymous composition, so that other languages need to introduce the concept of inheritance and even virtual inheritance of such obscure concepts to accomplish things, unified to the combination of such a basis.

The go language brings me a fifth surprise that eliminates the heap and stack boundaries. Before the go language, programmers were well aware of what variables were on the stack and which variables were on the heap. Heap and Stack is a concept based on the basic working model of modern computer system, and the go language shields the physical structure of variable definition on heap or stack, which is equivalent to encapsulating a new computer working model. This seems to be inconsistent with the design philosophy of explicit expression in the go language, but I think it is a great job and not contradictory to the explicit expression of the go language. The Go language emphasizes explicit expression of the developer's program logic (semantics) rather than the display of the computer's hardware structure. The high abstraction of computer hardware structure will help the go language adapt to the development of computer hardware.

The go language brings me the sixth surprise, is the go language support for C language. So to speak, the go language is one of the most friendly to C languages in all languages except Objective-c, C + +, the two languages that are compatible with the C-based target. What language can embed C code directly? No, except go. What language can call C functions seamlessly? No, except go. The perfect support for the C language is the key support for Go's rapid rise. Is there a more coveted community wealth than the C language? It's an inexhaustible gold mine.

In the preface to "Go Language programming", I talked about the basic philosophy of Go language from C, rather than C + +, as in Java and C #. The success of C language is that it is simple enough, so the go language is very simple. The orientation of the go language is the C language of the internet age. In essence, the features of the Go language revolve around the following design philosophies:

大道至简,显式表达。任何封装都是有漏洞的。最佳的表达方式就是最直白的表达方式,不试图去做任何包装。最少特性原则。如果一个功能不对解决任何问题有显著价值,那么就不提供。

Even though it's been a lot of language in the last 40 years, I think it's a breakthrough in C-language thinking, and it's going to be a new level of programming, just the go language.

The go language is a transformative language, which is the life of C (incidentally Java's life). The go language is simple but highly expressive. From the present state, the go language focuses on the development of the server domain, but this is not the full mission of the go language.

We say that the go language is suitable for server-side development only because of its standard library support, which is currently tilted to the server side:

network libraries, including Socket,HTTP,RPC, etc.);encoding libraries (includingJSON,XML,GOB, etc.);Cryptographic libraries (various cryptographic algorithms, digest algorithms);Web(including Template,HTMLsupport). 

While the general component of desktop development is GDI and UI system and event handling, basically not involved.

In short, I think the go language will lead the development of the IT industry in the next 10 years. In the first 5 years, the go language will shine on server-side programming, while desktop-side development is still in the exploration and refinement phase, and is expected to mature in the last 5 years, becoming one of the mainstream development languages on a variety of handheld devices.

Author Xu Xiwei, seven Qiniu Storage CEO, was a senior researcher at Shanda Innovation Institute, Jinshan Software Technology Director, WPS Office 2005 first-seat architect. Open source enthusiasts, including Winx, TPL and more than 10 C + + open source projects, with more than 15 years of experience in C + + development. After touching the go language, it can be dumped by the design philosophy of its boulevard to Jane and less. Seven Qiniu storage is the first crab-eating team in China, and the core service is fully implemented by GO language.

The first "Programmer's Magazine" is reproduced by its permission. This article has been selected from the 2012 issue of Programmer Magazine 10.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.