By Developers, For Developers

Historical errata for Swift Style

PDF PgPaper PgTypeDescriptionFixed onComments
259TYPO

“To give you a sense this scope,” -> “To give you a sense of this scope,” (missing “of”)

2016-12-14Edit applied. Thank you!
2711TYPO

“I call the mixed Alman-1TBS style” -> “I call the mixed Allman-1TBS style”

The name “Allman” is missing an L.

2016-12-14Edit applied. Thank you!
20TYPO

(on line 1)
you can pass often pass -> you can often pass

2016-12-15Edit applied. Thank you!
28ERROR

The mobi version does not correctly indent in the Kindle app on iPad. This is crucial for the first chapter about proper indentation. I first thought: what an odd way to indent by not indenting at all. When I opened the epub in iBooks I saw the correct indentations.
Cheers,
Markus

2017-03-10Confirmed and duplicated on iOS Kindle app. Does not appear to affect Windows, macOS, Android Kindle apps. Pragmatic engineers looking into this. \n \nUPDATE: Thanks for bringing this to our attention. Pragmatic doesn't support the on Kindle app iOS, because the app is non-standard. We recommend iBooks for iOS users, or PDF format. --Brian MacDonald
88ERROR

Chapter 3, " .​lazy​.prefix(while: { value <= 128 })"

Should read: .​lazy​.prefix(while: { $0 <= 128 })

2017-03-10
89TYPO

Chapter 3 “Swift code rarely uses `while` and `repeat-while` loops. The most common use case is `while true` that drives a infinite or breakable loop. ”

Drives an infinite not drives a infinite

2017-03-10
90SUGGEST

I use “the result is simpler and cleaner” twice within the chapter.

SUGGESTED FIX: Change second one from “Prefer `forEach` to `for-in` when you can apply a function reference to each member of a sequence. The result is simpler and cleaner:” to “Prefer `forEach` to `for-in` when you can apply a function reference to each member of a sequence:”

2017-03-10
110TYPO

Mandatory self has been adopted by a non-negligible large and worthy organizations.

FIX: Mandatory self has been adopted by a non-negligible number of large and worthy organizations.

2017-03-10
105TYPO

“And here is a more general version of with that supports value types. This alternate approach allowing creating modified versions of constants”

s/allowing/allows/

2017-03-10
22TYPO

A few Swift developers move in to its own,
should read:
A few Swift developers move in to its own line,

126TYPO

In last paragraph, I believe that “more flexibility” should be changed to “more flexibly”.

81TYPO

Adding a well-stated assertion failure ensures your assumptions about exhaustive cases was properly founded.
->were properly founded.

94TYPO

“prefer mentioning every case than catching final cases with default”. This seems to take the construction “prefer X than Y”, but I think typically you’d say “prefer X to Y.” So “prefer mentioning every case TO catching final cases with default”

75ERROR

Under “Chaining Calls”, `myInstance.surname.characters.count` is referred to as a fluent interface. The implication seems to be that any call chain is a fluent interface. But the Wikipedia page in the footnote says that a fluent interface entails more than just method chaining. Martin Fowler’s bliki page on the term says that typically fluent interfaces are used for configuring objects, and that the key is that they’re providing a domain-specific language. It seems to be primarily for setters, not for getters. So it doesn’t seem to me that just drilling into properties of objects qualifies as a fluent interface. At the very least, it’s debatable whether that term applies, so it may be best to qualify it.

Categories: