当前位置:网站首页>01. Go language introduction

01. Go language introduction

2022-07-06 01:39:00 [email protected]

Catalog

1. Go The origin of language

2. Go Characteristics of language

2.1. Automatic garbage collection

2. 2 Function can return multiple values

2.3. Concurrent programming

2.4. No dependence on hell , Even glibc

2.5. Compile once , Copy anywhere , Deployment is extremely convenient


1. Go The origin of language

Go Language is also called Golang Language , It's Google Goggle The company to launch .

Traditional languages such as c++, People spend too much time learning how to use the language , Rather than how to better express the writer's thoughts , Compile at the same time

It takes too long , For writing - compile - The cycle is too long to run this chain . Dynamic languages such as Python, Since there are no strongly typed constraints , very

Multiple problems need to be found at runtime , This low-level error should be left to the compiler to find . therefore Go The birth of .

2. Go Characteristics of language

Go Language ensures the security and performance of statically compiled languages , It also achieves the speed and maintainability of dynamic language development , It's been described Go Language : Go

= C + Python , explain Go Language has both C The speed of static language programs , It can reach Python The rapid development of dynamic language .Go The languages are as follows

characteristic :

2.1. Automatic garbage collection

C/C++ The biggest headache is the pointer problem , If you are not careful, the pointer will go wild or cross the boundary again . stay Go Don't worry about language anymore , Don't worry delete or

person free, The system will automatically recycle .

2. 2 Function can return multiple values

This is amazing , Most languages can only return one value ,Go Languages can return multiple values . This function makes developers no longer have to think hard

How to return value design , There is no need to define a structure for value transfer .

2.3. Concurrent programming

Go Language is naturally concurrent , Just the keywords “go” You can make the function execute concurrently , Make concurrent programming easier , This is also Go The biggest advantage of language

potential .

2.4. No dependence on hell , Even glibc

2.5. Compile once , Copy anywhere , Deployment is extremely convenient

原网站

版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060130187896.html