The Most Important Sentences

Prenez
VStackable
Published in
2 min readSep 27, 2023

--

in Advanced Swift

(Advanced Swift is a great book from Objc.io. Highly recommended.)

1 When we’re using a protocol like a concrete type, the compiler creates a wrapper type for the protocol, called an existential, behind the scenes. 2 Like witness and much of type theory in general, the term comes from logic: the DrawingContext asserts that there exists some type that satisfies its requirements. (3 In contrast, generics create “for all” relationships: the generic type Array<Element> asserts that for all types Element, there’s a corresponding type

--

--

Prenez
VStackable

Writes iOS apps in Swift and stories in American English.