今天google采用 BSD-style license推出开源的Go编程设计语言。
在Go的官网上宣称这是一种simple、fast、safe、concurrent,能快速构建,有着清晰的语法和垃圾回收机制,像一个动态语言但又有着静态语言的速度和安全性。
目前Go语言支持两种操作系统( Linux, Mac OS X)和三种指令集:amd64 (64-bit x86, the most mature port), 386 (32-bit x86), and arm (32-bit ARM, an incomplete port)。
* Go语言官网
http://golang.org/
(如果不能访问,请使用代理)
* 安装及环境设置
http://golang.org/doc/install.html
* 入门手册
http://golang.org/doc/go_tutorial.html
* 语法
http://golang.org/doc/effective_go.html
Hello world例子
Go 源文件后缀为.go
源码采用Unicode(UTF-8)
//
/
方法1.
* 编译 6g(64b-x86),8g(32b-x86)
* 链接 6l(64b-x86),8l(32b-x86)
6g(8g) helloworld.go -------->helloworld.6(helloworld.8) //编译
6l(8l) helloworld.6(helloworld.8) ----->6.out(8.out) //链接
6.out(8.out) //运行
方法2.
* 编译、链接 gccgo
gccgo helloworld.go ----------->a.out //编译、链接
a.out //运行