Errata for Expert Swift 1st Edition

Yikes. Thanks for reporting that. I will give it a look right now.

1 Like

Thanks again. The issue(s) should all be fixed now.

1 Like

Hi there, I found a typo in Chapter 5 Numerics & Ranges - 5.2 Integers

Adding integer operations to BitViewer

This menu can be rendered by the SwiftUI interface. To enable it, open Views/NumericOperationsView.swift and uncomment the block of code around line 40:

line number should be 14 not 40

Thanks for great content in this book anyway! :+1:

Hi, I started to read Expert Swift, and I’m liking it a lot so far. I have a question, in the “Key Points” for Chapter 1, I found the following:

“Pass a closure as a parameter that returns a value to defer evaluation of the argument until within the body of a function”

Shouldn’t this read instead:

“Pass a closure that returns a value as a parameter to defer evaluation of the argument until within the body of a function”

But perhaps, I’m not reading this how it should be read, let me know, thanks.

Chapter 3: Protocols at Using Protocols as types.

func greet(with greeter: Greeter) -> Void
let englishGreeter: Greeter = EnglishGreeter()
let allGreeters: [Greeter] = [englishGreeter]

TYPO: Greetable instead of Greeter
There are more in the rest of that chapter

Chapter 4: Generics at Adding caching with type erasure

The final changes in ArticlesViewModel.swift, method fetchImage(for:) do not differentiate between the success and failure cases for publisher completion. I think that the sink completion closure should be the same as in chapter 3:

.sink(receiveCompletion: { completion in
    switch completion {
    case .failure(let error): print(error)
    default: break
    }
}

rather than its corresponding version from chapter 4:

.sink(receiveCompletion: { error in
    print(error)
}

I also noticed that [weak self] capture is missing from the receiveValue closure.