Files
the-way-to-go_ZH_CN/eBook/16.4.md
2016-03-23 22:50:49 +08:00

12 lines
470 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.

# 16.4 何时使用new()和make()
在第[7.2.1小节](07.2.md)和第[10.2.2](10.2.md)小节,我们已经讨论过此问题,并使用代码进行详细说明,观点如下:
- 切片、映射和通道使用make
- 数组、结构体和所有的值类型使用new
## 链接
- [目录](directory.md)
- 上一节:[发生错误时使用defer关闭一个文件](16.3.md)
- 下一节:[不需要将一个指向切片的指针传递给函数](16.5.md)