Swift Changes and Errata
This page has notes on recent changes to Swift and errata in the book.
Changes to the print statement effective in Xcode 7.1 beta6
Minor errors in the print version of the book.
Changes to the print statement:
The print statement in Swift 1 had two versions: print("hey") printed the value only, while println("hey") printed the value followed by a linefeed ("\n").
The first implementation of the print statement in Swift 2 had two versions. The statement print("hey") resulted in printing the value only. A second version had two parameters. The second parameter, labeled "appendNewline", had one of two values: true or false. If true, it appended a newline character; if false, it did not.
This has now been changed, effective in Xcode 7.1 beta6, to the following: The statement print simply prints the value provided, with no linefeed. A second version, e.g., print("hey", terminator: "") prints the value provided in for the terminator parameter, which is either blank or "\n" if a newline character is desired.
Minor errors in the print version of the book: