Skip to content

Commit

Permalink
Incorporate edits.
Browse files Browse the repository at this point in the history
Co-authored-by: Chuck Toporek <chuck_toporek@apple.com>
  • Loading branch information
amartini51 and Chuck Toporek committed May 1, 2023
1 parent bd69a4c commit 4754b42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TSPL.docc/LanguageGuide/Protocols.md
Expand Up @@ -755,7 +755,7 @@ a nonfailable initializer or an implicitly unwrapped failable initializer.
## Protocols as Types

Protocols don't actually implement any functionality themselves.
Nonetheless, you can use a protocol as a type in your code.
Regardless, you can use a protocol as a type in your code.

The most common way to use a protocol as a type
is to use a protocol as a generic constraint.
Expand All @@ -781,8 +781,8 @@ Code with a boxed protocol type
works with any type, chosen at runtime, that conforms to the protocol.
To support this runtime flexibility,
Swift adds a level of indirection when necessary ---
this indirection is known as a *box*,
and it has a performance cost.
known as a *box*,
which has a performance cost.
Because of this flexibility,
Swift doesn't know the underlying type at compile time,
which means you can access only the members
Expand Down

0 comments on commit 4754b42

Please sign in to comment.