Minor Typo in Swift Book Basics Chapter

Hello, my name is Akram. I am an undergrad CS student familiar with Java and Python, and want to pick up Swift. I have been reading the basics page to get started, and I believe I noticed a typo. In the Integer Bounds section, the last paragraph seems to write “that” instead of “than” in the sentence “Calculations that produce out-of-bounds results, like a number larger that the max property, stop the program’s execution instead of storing an invalid result.” I have pasted the current paragraph below

Current with “that” highlighted in bold:
“Calculations that produce out-of-bounds results, like a number larger that the max property, stop the program’s execution instead of storing an invalid result. You can explicitly make the operation overflow instead, as described in Overflow Operators.”

Proposed with “than” italicized:
“Calculations that produce out-of-bounds results, like a number larger than the max property, stop the program’s execution instead of storing an invalid result. You can explicitly make the operation overflow instead, as described in Overflow Operators.”

Again, I could be mistaken and this is conveying something I misunderstood, but feel free to take a look at this if the current version is erroneous. Thank you to everyone who works on Swift and makes it such a beautiful language :)

1 Like

Hi Akram!

Thanks for the report !While I could make this fix, I wanted to make sure you knew you could too.

The content in question is line 545 of swift-book/TSPL.docc/LanguageGuide/TheBasics.md at main · swiftlang/swift-book · GitHub, and you can propose a change through GitHub directly. I'd love to encourage you to do that, as we very much appreciate fixes such as these. (I really wish we had a convenient way to put an "Edit this page" thing on the HTML that presents to encourage edits and fixes for typos like these)

If you do, let me know the PR - either here or DM me through the forums, but I'll try and keep an eye as well.

1 Like

Hey Joseph, thank you so much for the reply. I just forked the repo and commited a fix, and my pull request is currently awaiting approval. I have sent a screenshot of the request’s status. My GitHub username is akram-um.

3 Likes

Thanks @akram for making the PR :heart:

1 Like