Files
the-way-to-go_ZH_CN/eBook/07.0.md
2014-10-26 22:28:14 +08:00

10 lines
822 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#7.0 数组与分片
这章我们开始剖析*容器*, 它是可以包含大量条目(item)的数据结构, 像 arrays(slices) / maps。从这看到 Go 明显受到 Python 影响。
以[ ]符号标识的数组类型几乎在所有的编程语言中都是一个基本主力。Go语言中的数组也是类似的只是有一些特点。Go没有C那么灵活但是拥有分片slice类型。这是一种建立在Go语言数组类型智商的抽象要想理解slice我们必须先理解数组。数组有特定的用处但是却有一些呆板所以在Go语言的代码里并不是特别常见。相对的slice确实随处可见的。它们构建在数组之上并且提供更强大的能力和便捷。
##链接
- [目录](directory.md)
- 上一节:[]()
- 下一节:[声明和初始化](07.1.md)