Home>Article>Backend Development> Is go language a low-level language?

Is go language a low-level language?

青灯夜游
青灯夜游 Original
2022-11-30 20:01:55 6600browse

The go language is not a low-level language. The underlying language is also called a low-level language, which refers to a language with low implementation efficiency, high execution efficiency, strong controllability of hardware, small target code, poor maintainability, and poor portability. The go language is a high-level programming language. It is designed to solve practical problems in the development process of large systems. It supports concurrency, unified specifications, simplicity, elegance, and powerful performance.

Is go language a low-level language?

The operating environment of this tutorial: Windows 7 system, GO version 1.18, Dell G3 computer.

The bottom language, also called a low-level language, refers to a language with low implementation efficiency, high execution efficiency, strong controllability of hardware, small target code, poor maintainability, and poor portability.

The go language is not a low-level language.Go language isa high-level programming languageopen sourced by Google in 2009. It is designed to solve practical problems in the development process of large systems and supports concurrency and unified standards. , simple and elegant, with powerful performance, it is praised by many Go language evangelists as "C language in the cloud computing era".

Go language, as a high-level language similar to C, lowers the threshold of C pointer programming, but also adds some potential programming traps. Even veterans who are proficient in using Go language will accidentally step on it. pit. So need to pay attention.

Let’s talk about the development history of Go language and the characteristics of Go language.

Name of Go

Is go language a low-level language?##This is a letter written by Rob Pike in September 2007 An email sent to Robert Griesemer and Ken Thompson at 3:12 pm on November 25th on the topic of programming language discussion. The main text of the email is:

I got some inspiration on the way home: * Give this The programming language is named "go", which is short and easy to write. * Tool classes can be named: goc, gol, goa. * The interactive debugging tool can also be directly named "go". * The suffix of language files is .go, etc.

Like many great companies born in garages, the name of the Go language is also related to cars. The above is the origin of the name of the Go language. I personally like the name Go very much. It seems like a random idea, but it is very precise. It has the pure blood of Google and embodies the characteristics of simple and elegant language. And the keyword to open a coroutine in Go is go.

Google Engineer’s 20% Time

Since then, Robert, Rob and Ken have been conducting research and development within Google until 2009, when Go was officially open source Today, the Go project team regards November 10, 2009, the day when the language was officially open sourced, as its official birthday. The source code was initially hosted on

http://

The three founders of Go language

The three most important founders of Go language are mentioned in the email:

Is go language a low-level language?Let us get to know these 3 big guys:
  • Rob Pike: He was a member of the Unix development team at Bell Labs, the main leader in the development of the Plan9 operating system, and the main leader in the development of the Inferno operating system.
  • ken tomption: Winner of the Turing Award, author of the B language, the predecessor of C language, one of the inventors of Unix, and the main author of the operating system Plan 9. Co-developed UTF-8.
  • Robert: Developed code for Google's V8 JavaScript engine and Chubby.

Go language lineage

The development of programming languages is similar to the evolution of species. Each programming language draws upon the best of its predecessors and then innovates and improves upon them. The figure below shows what advantages Go has inherited from its predecessors. Go is standing on the shoulders of these giants and playing an increasingly important role in the cloud era.

Is go language a low-level language?

Features that Go language inherits from its predecessors:

  • #C language: Go language is sometimes Described as a "C-like language", or "C language for the 21st century".Go inherits similar expression syntax, control flow structure, basic data types, call parameter value transfer, pointers and many other ideas from C language, as well as thecompiled version that C language has always been interested in The running efficiency of machine code and the seamless adaptation to existing operating systems.
  • Pascal: But there are other ancestors in the Go language family tree. One influential branch comes from the Pascal language designed by Niklaus Wirth. Then the Modula-2 language inspired the concept ofpackages. Then the Oberon language abandoned the distinction between module interface files and module implementation files. The second generation Oberon-2) language directly affects the syntax of package import and declaration, as well as the declaration syntax of methods provided by the object-oriented features of the Oberon language.
  • CSP: Another ancestor of the Go language, it brings the important features of the Go languagethat distinguish it from other languages. It was inspired by the little-known work published by Tony Hoare of Bell Labs in 1978. The basic literature on concurrency research known to the outside world is communicating sequential processes (abbreviated as CSP). In CSP, a program is a set of parallel running processes without shared state. They usepipelinesfor communication and control synchronization. However, Tony Hoare's CSP is only a description language used to describe the basic concepts of concurrency, and is not a general-purpose programming language that can write executable programs.Go language uses pipes to communicate in coroutines.

Heavyweight applications

The following are some heavyweight applications of Go language:

Is go language a low-level language?

Advantages of Go

Programmer’s Voice: I can prototype, test and prototype a production system in a matter of days if the real world requires it. Deployment, and can handle 5 times more requests per second than the original, with very little CPU and memory overhead. I think only the Go language can do it.

Go language has the following advantages:

  • Separate binary release: Go project compilation will generate a static executable file. This file can be run independently without any other dependencies. This approach is particularly suitable for cloud-native container environments.
  • Cross-compilation: Compile binaries on any operating system that run on other platforms. For example, on a Mac system, binary files can be compiled that can run on Linux and Windows.
  • Garbage collection: Go language supports garbage collection. In comparison, C, Rust, etc. require developers to control themselves.
  • Execution performance: Go is very fast. Performance is close to C. Much higher than Java, Python, and Node.
  • Development efficiency: Go language has both the running performance of static languages and the development efficiency of dynamic languages.
  • Simplicity and efficiency: The design philosophy of the Go language includes simplicity and efficiency. A typical counterexample is the complex and bloated Java language.
  • Concurrency: The language level supports concurrency, simplifies concurrent development through coroutines and channels, and improves concurrency performance.
  • Rich standard library: The Go standard library covers text, IO, network, encryption, Web services, remote RPC, template engine and other functions.
  • C language can be called: C language functions can be called to further optimize performance and reuse the huge ecosystem of C language.
  • Fast compilation time: Go compiles very quickly. You can refer to two static blog generation systems, Hexo (developed by Node) and Hugo (developed by Go).
  • Engineering type: The purpose of Go language design is to become an engineering language to solve actual engineering problems. The Go language defines development specifications and provides a wealth of tools. Using Go language, you can write programs that are easy to read and understand, and easy to test, maintain and expand.

Go Disadvantages

  • Lack of heavyweight framework. Such as Ruby's Rails, Python's Django, and Java's Spring.
  • Error handling: No exception system. Go officials are fixing this issue.
  • Software package management: For a long time, Go has not officially had a package management system. Until recently, Go version 1.13 officially introduced Go Module as an official dependency management tool.
  • is not a standard object-oriented programming model: this is also an innovation of the Go language. If you are a solid OOP advocate, you may be a little uncomfortable with it

For more programming-related knowledge, please visit:Programming Video! !

The above is the detailed content of Is go language a low-level language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn