当前位置:网站首页>go笔记(1)go语言介绍以及特点
go笔记(1)go语言介绍以及特点
2022-07-04 19:03:00 【fiveym】
1. Go语言的由来
Go语言亦叫Golang语言,是由谷歌Goggle公司推出。
传统的语言比如c++,大家花费太多时间来学习如何使用这门语言,
而不是如何更好的表达写作者的思想,同时编译
花费的时间实在太长,对于编写-编译-运行这个链条来说周期太长。
动态语言如Python,由于没有强类型的约束,很多问题需要在运行时发现,
这种低级错误更应该交给编译器来发现。于是Go诞生了。
2. Go语言的特点
Go语言保证了既能到达静态编译语言的安全和性能,又达到了动态语言开发速度和易维护性,
有人形容Go语言: Go = C + Python , 说明Go语言既有C静态语言程序的运行速度,又能达到Python动态语言的快速开发。Go语言有以下
特性:
1. 自动垃圾回收
C/C++最头疼的就是指针问题,一不小心就野指针了或者又越界了。在Go语言里再也不用担心,也不用考虑delete或 者free,系统自动会回收。
2. 函数可以返回多个值
这个很神奇,大多数语言只能返回一个值,Go语言可以返回多个值。这个功能使得开发者再不用绞尽脑汁的想到底
怎么返回值的设计,也不用为了传值专门定义一个结构体。
3. 并发编程
Go语言天然并发,只需要关键字“go”就可以让函数并发执行,使得并发编程变得更为简单,这也是Go语言最大的优
势。
4. 没有依赖地狱, 甚至是glibc
5. 编译一次,随处拷贝,部署极为方便
边栏推荐
- 一文搞懂Go语言中文件的读写与创建
- 凌云出海记 | 文华在线&华为云:打造非洲智慧教学新方案
- 电脑共享打印机拒绝访问要怎么办
- Offset function and windowing function
- The problem of the maximum difference between the left and right maxima
- Related concepts of federal learning and motivation (1)
- 复杂因子计算优化案例:深度不平衡、买卖压力指标、波动率计算
- Qt编写物联网管理平台38-多种数据库支持
- 电脑页面不能全屏怎么办?Win11页面不能全屏的解决方法
- c# . Net MVC uses Baidu ueditor rich text box to upload files (pictures, videos, etc.)
猜你喜欢

The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!

Decryption function calculates "task state and lifecycle management" of asynchronous task capability

上线首月,这家露营地游客好评率高达99.9%!他是怎么做到的?

What is the application technology of neural network and Internet of things

#夏日挑战赛#带你玩转HarmonyOS多端钢琴演奏

CANN算子:利用迭代器高效实现Tensor数据切割分块处理

九齐NY8B062D MCU规格书/datasheet
实践示例理解js强缓存协商缓存

On communication bus arbitration mechanism and network flow control from the perspective of real-time application

New wizard effect used by BCG
随机推荐
Oracle database, numbers Force 2 decimal places to display-Alibaba Cloud
Win11无法将值写入注册表项如何解决?
Lingyun going to sea | 10 jump &huawei cloud: jointly help Africa's inclusive financial services
Hash quiz game system development how to develop hash quiz game system development (multiple cases)
Flet教程之 06 TextButton基础入门(教程含源码)
FS8B711S14电动红酒开瓶器单片机IC方案开发专用集成IC
node强缓存和协商缓存实战示例
Creation of JVM family objects
AP8022开关电源小家电ACDC芯片离线式开关电源IC
Data set division
Is it safe for Great Wall Securities to open an account? Stock account opening process online account opening
Regular replacement [JS, regular expression]
MySQL中的日期时间类型与格式化方式
In operation (i.e. included in) usage of SSRs filter
Basic use of kotlin
Application practice | Shuhai supply chain construction of data center based on Apache Doris
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
ICML 2022 | meta proposes a robust multi-objective Bayesian optimization method to effectively deal with input noise
How is the entered query SQL statement executed?
Development and construction of DFI ecological NFT mobile mining system