


After the head of the Go language resigned, a domestic language was born
Event Review
Last week, Steve Francia, the head of Google’s Go language project, announced his resignation, and he The reason given was that work on the Go project had stalled, which made him feel uncomfortable. Interestingly, some domestic Gophers (the self-proclaimed name of Go language enthusiasts) also have new ideas about the Go language. For example, Gophers such as Chai Shushan, one of the first Go language enthusiasts in China, and Shi Bin, who has long been ranked in the top 50 of global Go contributors, decided to launch a new programming language based on the Go language: Ao Language™ (Ao). Pronounced "Wa").
Currently, the code of Concave Language™ has been open sourced on Github, and simple executable examples are provided. According to the introduction of its warehouse, the design goals of WaGo Language™ are as follows: 1. C language cloaked in Go and Rust syntax 2. The suffix of the source code file of Wago Language™ is .wa3, and the concave Language™ compiler is compatible with WaGo syntax. Concave grammar is consistent with WaGo grammar at the AST level (the two can generate the same AST and convert each other losslessly) 4. Concave Language™ supports Chinese/English bilingual keywords, that is, any keyword has a Chinese version and an English version. The two are equivalent at the grammatical level
concave language™ indication, image source @GitHub
According to Chai Shushan, Shi Bin and others, the "restrained" style of Go language is their greatest common denominator for the aesthetics of programming languages. Therefore, when the Concave Language™ project was launched, it drew heavily on Go’s design ideas and specific implementation.
Of course, they also said that choosing the Go language as the initial blueprint was a compromise that had to be made with limited investment. They hope that as the project develops, they will accumulate more original designs and contribute to the trend of independent innovation. Although Chai Shushan, Shi Bin and others are senior Gophers, it is not difficult to understand their preference for Go language, but we can't help but wonder: How magical is Go language that makes them so fascinated by Go language?
Why choose Go language
Looking at the evaluation of Go by many developers who have used Go language, Go The language has the following four characteristics in design.
1. Simple and easy to use
Different from those that use each other Drawing on mainstream programming languages (such as C, Java, etc.) that are constantly adding new features, Go's designers refused to take the path of language feature integration at the beginning of language design, and chose "subtraction."
They left the complexity to the design and implementation of the language itself, to the Go core development team, and left the simplicity, ease of use and clarity to Most developers use Go language. Therefore, the Go language presents:
- Concise, conventional syntax (no need to parse symbol tables), only 25 keywords;
- No header file;
- Explicit dependency (package);
- No circular dependency (package);
- Constants are just numbers;
- The case of the first letter determines visibility;
- Any type can have methods (No class);
- No subtype inheritance (no subclass);
- No arithmetic conversion;
- There is no constructor or destructor;
- Assignment is not an expression;
- is defined in assignment and function call Evaluation order (no concept of "sequence points");
- No pointer arithmetic;
- Memory is always initialized to a zero value;
- No type annotation syntax (such as const, static, etc. in C)
- ......
2. Preference combination
Mainstream object-oriented languages such as C and Java couple various parts of the program through a huge top-down type system, inheritance, explicit interface implementation and other mechanisms. However, in the Go language we find There is no syntax element, type system and inheritance mechanism of classic object-oriented.
So how does the Go language couple the various parts of the program together? It's a combination.
At the language design level, Go uses orthogonal grammatical elements, including the Go language typeless system. Types are independent and there is no concept of subtypes; each type has You can have your own set of methods, and type definitions and method implementations are orthogonal and independent.
Through type embedding between types, already implemented functions are embedded into new types to quickly meet the functional requirements of new types. When calling a method on an instance of a new type, method matching depends on the method name, not the type.
In addition, the aggregation of interface behaviors is achieved by embedding the interface type in the definition of the interface to form a large interface. This method is particularly commonly used in the standard library and has become An idiom of Go language.
This is an innovative design of the Go language: the interface is just a collection of methods, and the relationship with the implementer is implicit, which can reduce the coupling between various parts of the program. to the lowest.
3. Concurrency and lightweight
Three things about Go language Designers Rob Pike, Robert Griesemer and Ken Thompson once believed that the C standard committee was short-sighted in thinking, because the hardware is likely to undergo major changes in the next ten years, and it is very unwise to tightly couple the language with the hardware at that time. It cannot bring much help to developers when writing large-scale concurrent programs.
So they regard multi-core oriented, native built-in concurrency support as one of the design principles of the new language.
The design philosophy of Go language’s native support for concurrency is reflected in the following two points.
# (1) The Go language adopts a lightweight coroutine concurrency model, making Go applications more scalable when facing multi-core hardware. (2) The Go language provides developers with syntax elements and mechanisms that support concurrency.
4. Engineering-oriented
# Designers of Go language In the initial design stage of the Go language, solving engineering problems was regarded as one of Go's design principles, and then the design of Go's grammar, tool chain and standard library was considered. This is also the design idea between Go and those more academic and research-oriented programming languages. a major difference.
#This makes the Go language specification simple and flexible enough that programmers with a foundation in other languages can quickly get started. More importantly, Go comes with a complete tool chain, which greatly improves the consistency of team collaboration. For example, Gofmt automatically formats Go code, which largely eliminates the problem of inconsistent formatting styles of codes written by different people. Configure the editor to automatically run Gofmt when editing an archive, so that you can place it anywhere when writing code, and it will automatically become correctly formatted code when archiving. In addition, there are very useful tools such as Gofix and Govet.
In short, Go’s simplicity at the language level allows Go to gain expressiveness that is not inferior to C/Java, etc., while also gaining better readability and more flexibility. High development efficiency and other more important elements in the field of software engineering.
The future of concave language™
Although today, Gowith its superior performance , has become one of the mainstream programming languages (more than 75%#CNCF projects, including Kubernetes and Istio are both written in Go. In addition, Go is also one of the major cloud application languages), Go language is also quite popular in China, but we still can’t help but worry about being born out of Go# Will ##’s concave language™ have a bright future?
#It has always been difficult to predict the future. However, fortunately, there is a forerunner in front of Concave Language™-Go language. We might as well based on Go development, to roughly speculate on the future of Concave Language™.
Go is a programming language invented by Qiniu Cloud CEO Xu Shiwei. It was officially released in July 2020 and version 1.0 was launched in October 2021. The latest version is currently released on June 13 this year. Released version 1.1. In other words, after nearly two years from its official release to now, Go is still in its initial stage and is still far away from large-scale application. It can be foreseen that Concave Language™ will not enter the market for a long time in the future. In the eyes of the majority of developers.
In addition, according to Xu Shiwei’s views at the ECUG Con 2022 conference, although everyone pays more attention to the performance of programming languages, from a performance perspective alone, Xu Shiwei believes that Python is among the scripting languages. It can only be considered second-rate, and Python is actually not fast.
In Xu Shiwei’s view, the most important thing for a new language is the target group it chooses. The target group chosen by Go is the whole people. Xu Shiwei calls it "a language that even children can master." Therefore, Go starts from the integration of engineering and STEM education to lay a user base.
It is these characteristics of Go that make some developers optimistic about the future of Go. The positive expectations for Go will help Go's further development.
This principle is also applicable to Concave Language™:
The development focus of Concave Language™ may not lie in performance, but in which groups it chooses as its target audience, and How to obtain seed users.If the project team of Ao Language™ will announce these news in the future, then the future of Ao Language™ can still be looked forward to.
The above is the detailed content of After the head of the Go language resigned, a domestic language was born. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











In Go, WebSocket messages can be sent using the gorilla/websocket package. Specific steps: Establish a WebSocket connection. Send a text message: Call WriteMessage(websocket.TextMessage,[]byte("Message")). Send a binary message: call WriteMessage(websocket.BinaryMessage,[]byte{1,2,3}).

Go and the Go language are different entities with different characteristics. Go (also known as Golang) is known for its concurrency, fast compilation speed, memory management, and cross-platform advantages. Disadvantages of the Go language include a less rich ecosystem than other languages, a stricter syntax, and a lack of dynamic typing.

In Go, you can use regular expressions to match timestamps: compile a regular expression string, such as the one used to match ISO8601 timestamps: ^\d{4}-\d{2}-\d{2}T \d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-][0-9]{2}:[0-9]{2})$ . Use the regexp.MatchString function to check if a string matches a regular expression.

Memory leaks can cause Go program memory to continuously increase by: closing resources that are no longer in use, such as files, network connections, and database connections. Use weak references to prevent memory leaks and target objects for garbage collection when they are no longer strongly referenced. Using go coroutine, the coroutine stack memory will be automatically released when exiting to avoid memory leaks.

When passing a map to a function in Go, a copy will be created by default, and modifications to the copy will not affect the original map. If you need to modify the original map, you can pass it through a pointer. Empty maps need to be handled with care, because they are technically nil pointers, and passing an empty map to a function that expects a non-empty map will cause an error.

In Golang, error wrappers allow you to create new errors by appending contextual information to the original error. This can be used to unify the types of errors thrown by different libraries or components, simplifying debugging and error handling. The steps are as follows: Use the errors.Wrap function to wrap the original errors into new errors. The new error contains contextual information from the original error. Use fmt.Printf to output wrapped errors, providing more context and actionability. When handling different types of errors, use the errors.Wrap function to unify the error types.

There are two steps to creating a priority Goroutine in the Go language: registering a custom Goroutine creation function (step 1) and specifying a priority value (step 2). In this way, you can create Goroutines with different priorities, optimize resource allocation and improve execution efficiency.

Unit testing concurrent functions is critical as this helps ensure their correct behavior in a concurrent environment. Fundamental principles such as mutual exclusion, synchronization, and isolation must be considered when testing concurrent functions. Concurrent functions can be unit tested by simulating, testing race conditions, and verifying results.
