Go Proverbs(Go 谚语)

Simple, Poetic, Pithy

简单、诗意、简洁

Don't communicate by sharing memory, share memory by communicating.
不要通过共享内存来通信,而要通过通信来共享内存。

Concurrency is not parallelism.
并发不是并行。

Channels orchestrate; mutexes serialize.
通道协调;互斥序列化。

The bigger the interface, the weaker the abstraction.
接口越大,抽象越弱。

Make the zero value useful.
让零值变得有用。

interface{} says nothing.
interface{} 什么也没说。

Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.
没有人喜欢 Gofmt 的风格,但每个人都喜欢 Gofmt。

A little copying is better than a little dependency.
少量复制胜过少量依赖。

Syscall must always be guarded with build tags.
Syscall 必须始终使用构建标记。

Cgo must always be guarded with build tags.
Cgo 必须始终使用构建标记。

Cgo is not Go.
Cgo 不是 Go。

With the unsafe package there are no guarantees.
有了不安全包,就没有保证。

Clear is better than clever.
清楚比聪明好。

Reflection is never clear.
反射永远不会清晰。

Errors are values.
错误就是价值。

Don't just check errors, handle them gracefully.
不要只检查错误,要优雅地处理错误。

Design the architecture, name the components, document the details.
设计架构,命名组件,记录细节。

Documentation is for users.
文档是为用户准备的。

Don't panic.
不要惊慌。

标签: Go

添加新评论