Home  >  Article  >  Operation and Maintenance  >  What language is Docker written in?

What language is Docker written in?

Guanhui
GuanhuiOriginal
2020-06-11 17:31:328036browse

What language is Docker written in?

What language is Docker written in?

Docker is written in Go language, which is a statically strongly typed, compiled, concurrent programming language with garbage collection function. It is often used for web program development and has mature Web development frameworks, such as Beego, Gin, Iris, etc.

Go language description

The syntax of Go is close to the C language, but the declaration of variables is different. Go supports garbage collection. Go's parallel model is based on Tony Hall's Communicating Sequential Process (CSP). Other languages ​​that adopt a similar model include Occam and Limbo, but it also has features of Pi operations, such as channel transmission. Plugin support is opened in version 1.8, which means that some functions can now be dynamically loaded from Go.

Compared with C, Go does not include functions such as enumeration, exception handling, inheritance, generics, assertions, virtual functions, etc., but it adds slice type, concurrency, pipes, garbage collection, Language-level support for features such as interfaces. The Go 2.0 version will support generics, but has a negative attitude towards the existence of assertions, and also defends that it does not provide type inheritance.

Unlike Java, Go has built-in associative arrays (also known as hash tables (Hashes) or dictionaries (Dictionaries)), just like the string type.

Go language features

Go language is a static, compiled language developed by Google that comes with garbage collection and concurrency.
The style of Go language is similar to C language. Its syntax has been greatly optimized based on C language. Unnecessary expression brackets have been removed. Loops only have one expression method, for, which can realize numerical values, key values, etc. Therefore, it is very easy to get started with Go language.
The most distinctive feature of Go language is goroutine. Go language can realize concurrency and parallelism of functions through goroutine at the language layer. Goroutine is similar to a thread, but it is not a thread. Goroutine will Automatic scheduling is performed when the Go language is running. Therefore, the Go language is very suitable for writing high-concurrency network services.

Recommended tutorial: "Go Tutorial"

The above is the detailed content of What language is Docker written in?. 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