Home  >  Article  >  Backend Development  >  Is go a dynamically typed language?

Is go a dynamically typed language?

王林
王林Original
2021-02-04 15:15:162412browse

go is not a dynamically typed language. Go is a statically strongly typed language. Go programs can be composed of multiple tags, which can be keywords, identifiers, constants, strings, symbols, etc., such as [fmt.Println("Hello, World!")].

Is go a dynamically typed language?

The operating environment of this article: windows10 system, GO 1.18, thinkpad t480 computer.

Go (also known as Golang) is a statically strongly typed, compiled, concurrent programming language with garbage collection capabilities developed by Google.

Go programs can be composed of multiple tags, which can be keywords, identifiers, constants, strings, and symbols. For example, the following GO statement consists of 6 tags:

fmt.Println("Hello, World!")

The 6 tags are (one per line):

1. fmt
2. .
3. Println
4. (
5. "Hello, World!"
6. )

In the Go program, one line represents the end of a statement. Each statement does not need to end with a semicolon ; like other languages ​​in the C family, because this work will be done automatically by the Go compiler.

If you plan to write multiple statements on the same line, they must be artificially distinguished by ;, but in actual development we do not encourage this practice.

Related recommendations: golang tutorial

The above is the detailed content of Is go a dynamically typed 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