2015年10月8日 星期四

[Go]Go 1.5 Release 重點整理

Go 1.5 是一個非常大的改進,最重要的幾點是 GC 的改變以及 gomobile 的支援。 Go 的 GC 一直以來就被說低效能,而 GC 是多麼重要的一件事情。 Gomobile 則是正式支援了 android 與 ios App,開啟了 Go 的 mobile 時代。

根據 Go Blog Go 1.5 的重點如下 :
  • Implementation:
    • Compiler Tool Chain 從 C 變成 Go
    • Garbage Collection 從新設計改善 GC pause time
    • GOMAXPROCS Default 由 1 變成 logical CPU 數目
    • Go Linker 更改可以 build archieve or shared library 讓 C 使用

  • Tools
    • internal package (只有某些鄰近package 可以使用) : 實驗性質的 Vendoring Packages
    • 新的 go tool trace : program trace 的視覺化工具
    • 新的 go doc : 新的 command line

  • Operation system & architecture
    • 較成熟的 darwin/arm, darwin/arm64 (Apple's iPhone and iPad devices), and linux/arm6 架構 (darwin/arm64 用在  gomobile)
    • 實驗性質的ppc64 and ppc64le (IBM 64-bit PowerPC, big and little endian)
  • Language
    • 幾乎沒有 很細微的 Map , 的 element type 省略支援
  • Standard Libray
    • 比較簡潔的 usage message
    • math/big package 支援 Float type
    • DNS resolver on Linux and BSD : 不用 cgo requirement
    • go/type 被移到 standard library 了
    • reflect library 增加ArrayOf & FuncOf Function
    • 其他小改


Reference:
Go 1.5 Release Note