Clarify grammar regarding let binding

This commit is contained in:
Christopher Yung 2015-10-20 10:56:05 -07:00
Родитель 55648d39ec
Коммит 428fc815bd
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -28,7 +28,7 @@ Use `let foo = …` over `var foo = …` wherever possible (and when in doubt).
_Rationale:_ The intent and meaning of both keywords is clear, but *let-by-default* results in safer and clearer code.
A `let`-binding guarantees and *clearly signals to the programmer* that its value is supposed to and will never change. Subsequent code can thus make stronger assumptions about its usage.
A `let`-binding guarantees and *clearly signals to the programmer* that its value will never change. Subsequent code can thus make stronger assumptions about its usage.
It becomes easier to reason about code. Had you used `var` while still making the assumption that the value never changed, you would have to manually check that.
@ -284,4 +284,4 @@ _Rationale:_ Operators consist of punctuation characters, which can make them di
* [中文版](https://github.com/Artwalk/swift-style-guide/blob/master/README_CN.md)
* [日本語版](https://github.com/jarinosuke/swift-style-guide/blob/master/README_JP.md)
* [한국어판](https://github.com/minsOne/swift-style-guide/blob/master/README_KR.md)
* [한국어판](https://github.com/minsOne/swift-style-guide/blob/master/README_KR.md)