当前位置:网站首页>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. 编译一次,随处拷贝,部署极为方便
边栏推荐
- 记一次 .NET 某工控数据采集平台 线程数 爆高分析
- 上线首月,这家露营地游客好评率高达99.9%!他是怎么做到的?
- Ziguang zhanrui completed the first 5g R17 IOT NTN satellite on the Internet of things in the world
- Kotlin inheritance
- ICML 2022 | Meta提出鲁棒的多目标贝叶斯优化方法,有效应对输入噪声
- 栈:如何实现有效括号的判断?
- Win11亮度被锁定怎么办?Win11亮度被锁定的解决方法
- Selected review | machine learning technology for Cataract Classification / classification
- Flet教程之 07 PopupMenuButton基础入门(教程含源码)
- 实战模拟│JWT 登录认证
猜你喜欢
输入的查询SQL语句,是如何执行的?
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
Pointnet / pointnet++ point cloud data set processing and training
Crystal optoelectronics: ar-hud products of Chang'an dark blue sl03 are supplied by the company
Key rendering paths for performance optimization
Process of manually encrypt the mass-producing firmware and programming ESP devices
[today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born
Free soldier
MySQL中的日期时间类型与格式化方式
[in-depth learning] review pytoch's 19 loss functions
随机推荐
Lingyun going to sea | 10 jump &huawei cloud: jointly help Africa's inclusive financial services
Kotlin cycle control
Offset function and windowing function
Kotlin basic data type
Write it down once Net analysis of thread burst height of an industrial control data acquisition platform
Understand the reading, writing and creation of files in go language
太方便了,钉钉上就可完成代码发布审批啦!
CDGA|数据治理不得不坚持的六个原则
Related concepts of federal learning and motivation (1)
Win11共享文件打不开怎么办?Win11共享文件打不开的解决方法
2022 version of stronger jsonpath compatibility and performance test (snack3, fastjson2, jayway.jsonpath)
华为云云商店首页 Banner 资源位申请
Dark horse programmer - software testing - stage 08 2-linux and database-23-30-process port related, modify file permissions, obtain port number information, program and process related operations, Li
Is it safe for Great Wall Securities to open an account? Stock account opening process online account opening
Optimize if code with policy mode [policy mode]
Template_ Large integer subtraction_ Regardless of size
Six stones programming: about code, there are six triumphs
Regular replacement [JS, regular expression]
Oracle database, numbers Force 2 decimal places to display-Alibaba Cloud
易周金融 | Q1保险行业活跃人数8688.67万人 19家支付机构牌照被注销