Go语言,Google研发的语言,号称系统级编程语言(那么跟Rust必然也有相似的哲学了),Go语言被誉为21世纪的C语言。Go 是一种经过精心设计的实用性语言。在有其它语言(C语言)的基础时,学习Go语言不需要过多的精力。Go可以提高程序员的生产力,适合工程项目;但是Go语言缺少抽象能力,因此代码容易重复、冗余。Go语言常常在网络、分布式编程方面体现出优势,这自然也是设计者的初衷之一。
References
《Go语言圣经(The Go Programing Language)》
《Go入门指南》
《Go语言编程》
《Programming in Go》
为什么要使用 Go 语言?Go 语言的优势在哪里? - 知乎
Preface
“ 21世纪的 C 语言。”
Go语言致力于实现“简洁编程”的目标。
Go语言圣经(The Go Programing Language)这本书还是很不错的。
MIT实现了基于Go语言的操作系统,称为Biscuit。
Biscuit is a monolithic, POSIX-subset operating system kernel in Go for x86-64 CPUs. It was written to study the performance trade-offs of using a high-level language with garbage collection to implement a kernel with a common style of architecture. You can find research papers about Biscuit here: https://pdos.csail.mit.edu/projects/biscuit.html
环境安装
下载:https://golang.org/doc/install
windows下载msi安装即可,十分省事。
对于linux:(先下载压缩包)
1 | sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz |
写好Hello world:(hello.go
)
1 | package main |
运行测试:
1 | go build hello.go |
工具链
Docker
Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从 Apache2.0 协议开源。