Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yingang committed Mar 16, 2024
1 parent 1df1ace commit 3d3bb4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/ch14.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ void delete(Range selection) {...}
循环是一致性命名可以提供帮助的另一个领域。如果将诸如 `i``j` 之类的名称用于循环变量,则始终在最外层循环中使用 `i`,而在嵌套的循环中始终使用 `j`。这使读者可以在看到给定名称时对代码中发生的事情做出即时的(安全的)假设。

## 14.5 不同的意见:Go 样式指南
## 14.5 不同的观点:Go 样式指南

14.5 A different opinion: Go style guide
> 14.5 A different opinion: Go style guide
> Not everyone shares my views about naming. Some of the developers of the Go language argue that names should be very short, often only a single character. In a presentation on name choice for Go, Andrew Gerrand states that “long names obscure what the code does.”1 He presents this code sample, which uses single-letter variable names:
Expand Down

0 comments on commit 3d3bb4b

Please sign in to comment.