Skip to content

Commit d0e50d9

Browse files
committed
[Proposals] fix typos in 90+ proposals
1 parent 2c10ffe commit d0e50d9

File tree

95 files changed

+169
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+169
-169
lines changed

proposals/0006-apply-api-guidelines-to-the-standard-library.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ public struct OpaquePointer : ... {
11441144
- allowedCharacters: NSCharacterSet
11451145
- ) -> String?
11461146
+ public func addingPercentEncoding(
1147-
+ withAllowedCharaters allowedCharacters: NSCharacterSet
1147+
+ withAllowedCharacters allowedCharacters: NSCharacterSet
11481148
+ ) -> String?
11491149

11501150
- public func stringByAddingPercentEscapesUsingEncoding(

proposals/0018-flexible-memberwise-initialization.md

+16-16
Large diffs are not rendered by default.

proposals/0026-abstract-classes-and-methods.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in inherited class like protocols.
1616

1717
## Motivation
1818

19-
like pure virtual methods in C++ and abtract classes in Java and C#, frameworks development
19+
like pure virtual methods in C++ and abstract classes in Java and C#, frameworks development
2020
sometimes required abstract classes facility.
2121
An abstract class is like a regular class, but some methods/properties are not implemented
2222
and must be implemented in one of inherited classes.
@@ -97,7 +97,7 @@ class MyRestServiceClient : RESTClient {
9797
```
9898

9999
## Detailed design
100-
An abstract class cannot be instanciated.
100+
An abstract class cannot be instantiated.
101101

102102
Abstract method/property cannot have implementation.
103103

proposals/0058-objectivecbridgeable.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public protocol ObjectiveCBridgeable {
7777
/// Objective-C thunk or when calling Objective-C code.
7878
///
7979
/// - note: This initializer should eagerly perform the
80-
/// conversion without defering any work for later,
80+
/// conversion without deferring any work for later,
8181
/// returning `nil` if the conversion fails.
8282
init?(bridgedFromObjectiveC: ObjectiveCType)
8383

@@ -144,7 +144,7 @@ The compiler generates automatic thunks only when there is no ambiguity, while e
144144
3. Bridged collection types will still observe the protocol conformance if cast to a Swift type (eg: `NSArray as? [Int]` will call the `ObjectiveCBridgeable` implementation on `Array`, which itself will call the implementation on `Int` for the elements)
145145
2. A Swift type may bridge to an Objective-C base class then provide different subclass instances at runtime, but no other Swift type may bridge to that base class or any of its subclasses.
146146
1. The compiler should emit a diagnostic when it detects two Swift types attempting to bridge to the same `ObjectiveCType`.
147-
3. An exception to these rules exists for trivially convertable built-in types like `NSInteger` <--> `Int` when specified outside of a bridged collection type. In those cases the compiler will continue the existing behavior, bypassing the `ObjectiveCBridgeable` protocol. The effect is that types like `Int` will not bridge to `NSNumber` unless contained inside a collection type (see `BuiltInBridgeable below`).
147+
3. An exception to these rules exists for trivially convertible built-in types like `NSInteger` <--> `Int` when specified outside of a bridged collection type. In those cases the compiler will continue the existing behavior, bypassing the `ObjectiveCBridgeable` protocol. The effect is that types like `Int` will not bridge to `NSNumber` unless contained inside a collection type (see `BuiltInBridgeable below`).
148148

149149
### Resiliance
150150

proposals/0073-noescape-once.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ expected.
128128
## Not requiring exactly one execution
129129

130130
Assuming that the main goal of this proposal is to relax initialization
131-
requirements, a unique invocation of the closure is not stricly required.
131+
requirements, a unique invocation of the closure is not strictly required.
132132
However the requirement of unique invocation makes the proposal simpler to
133133
understand.
134134

proposals/0075-import-test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Swift's existing set of build configurations specify platform differences, not m
3333
#endif
3434
```
3535

36-
Guarding code with operating system tests can be less future-proofed than testing for module support. Excluding OS X to use UIColor creates code that might eventually find its way to a Linux plaform. Targeting Apple platforms by inverting a test for Linux essentially broke after the introduction of `Windows` and `FreeBSD` build configurations:
36+
Guarding code with operating system tests can be less future-proofed than testing for module support. Excluding OS X to use UIColor creates code that might eventually find its way to a Linux platform. Targeting Apple platforms by inverting a test for Linux essentially broke after the introduction of `Windows` and `FreeBSD` build configurations:
3737

3838
```swift
3939
// Exclusive os tests are brittle

proposals/0082-swiftpm-package-edit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This solution is intended to directly address the desired behaviors of the
9393
package manager:
9494

9595
* By hiding the sources by default, we minimize the distractions in the common
96-
case where a user is programming against a known, well-establised, library
96+
case where a user is programming against a known, well-established, library
9797
they do not need to modify.
9898

9999
* By adding a new, explicit workflow for switching to an "editable" package, we

proposals/0088-libdispatch-for-swift3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ struct DispatchData : RandomAccessCollection, _ObjectiveCBridgeable {
259259
}
260260
```
261261

262-
This proposal will introduce new accessor methods to access the bytes in a Data object. Along with becoming iteratable, several methods will be introduced that replace the ```dispatch_data_create_map``` approach used in C:
262+
This proposal will introduce new accessor methods to access the bytes in a Data object. Along with becoming iterable, several methods will be introduced that replace the ```dispatch_data_create_map``` approach used in C:
263263

264264
```swift
265265
struct DispatchData : RandomAccessCollection, _ObjectiveCBridgeable {

proposals/0099-conditionclauses.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## Introduction
1111

12-
Swift condition clauses appear in `guard`, `if`, and `while` statements. This proposal re-architects the condition grammar to enable an arbitrary mix of Boolean expressions, `let` conditions (which test and unwrap optionals), general `case` clauses for arbitrary pattern matching, and availability tests. It removes `where` clauses from optional binding conditions and case conditions, and eliminates gramatical ambiguity by using commas for separation between clauses instead of using them both to separate clauses and terms within each clause. These modifications streamline Swift's syntax and alleviate the situation where many Swift developers don't know they can use arbitrary Boolean conditions after a value binding.
12+
Swift condition clauses appear in `guard`, `if`, and `while` statements. This proposal re-architects the condition grammar to enable an arbitrary mix of Boolean expressions, `let` conditions (which test and unwrap optionals), general `case` clauses for arbitrary pattern matching, and availability tests. It removes `where` clauses from optional binding conditions and case conditions, and eliminates grammatical ambiguity by using commas for separation between clauses instead of using them both to separate clauses and terms within each clause. These modifications streamline Swift's syntax and alleviate the situation where many Swift developers don't know they can use arbitrary Boolean conditions after a value binding.
1313

1414
Swift-evolution thread:
1515
[\[Pitch\] making where and , interchangeable in guard conditions](https://forums.swift.org/t/pitch-making-where-and-interchangeable-in-guard-conditions/2702)

proposals/0106-rename-osx-to-macos.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This proposal is purely additive. It will not affect existing code other than ad
7373

7474
Instead of retaining and aliasing `os(OSX)`, it can be fully replaced by `os(macOS)`. This mirrors the situation with the phoneOS to iOS rename and would require a migration assistant to fixit old-style use.
7575

76-
Charlie Monroe points out: "Since Swift 3.0 is a code-breaking change my guess is that there is no burden if the Xcode migration assistent automatically changes all `#if os(OSX)` to `#if os(macOS)`, thus deprecating the term OSX, not burdening the developer at all. If iOS was renamed to phoneOS and kept versioning, you'd still expect `#if os(iOS)` to be matched when targeting phoneOS and vice-versa."
76+
Charlie Monroe points out: "Since Swift 3.0 is a code-breaking change my guess is that there is no burden if the Xcode migration assistant automatically changes all `#if os(OSX)` to `#if os(macOS)`, thus deprecating the term OSX, not burdening the developer at all. If iOS was renamed to phoneOS and kept versioning, you'd still expect `#if os(iOS)` to be matched when targeting phoneOS and vice-versa."
7777

7878
## Unaddressed Issues
7979

proposals/0107-unsaferawpointer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ value argument could result in miscompilation if the inferred type
160160
ever deviates from the user's original expectations. The type
161161
parameter also importantly conveys that the raw memory becomes
162162
accessible via a pointer to that type at the point of the call. The
163-
type should be explicitly spelled at this point because accesing the
163+
type should be explicitly spelled at this point because accessing the
164164
memory via a typed pointer of an unrelated type could also result in
165165
miscompilation.
166166

proposals/0108-remove-assoctype-inference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ There are some advantages to this approach. Brevity is slightly improved. A type
165165

166166
As well, Dave Abrahams expresses a [potential issue](https://forums.swift.org/t/pitch-remove-type-inference-for-associated-types/3135/17):
167167

168-
> Finally, I am very concerned that there are protocols such as `Collection`, with many inferrable associated types, and that conforming to these protocols could become *much* uglier.
168+
> Finally, I am very concerned that there are protocols such as `Collection`, with many inferable associated types, and that conforming to these protocols could become *much* uglier.
169169
170170
As with many proposals, there is a tradeoff between the status quo and the proposed behavior. As *Completing Generics* puts it,
171171

proposals/0119-extensions-access-modifiers.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This simple access control model also allows us to nest types inside each other
5656

5757
*Extensions* however behave differently when it comes to their access control:
5858

59-
* The *access modifier* of an *extension* sets the default modifier of its members which do not have their own localy defined modifier.
59+
* The *access modifier* of an *extension* sets the default modifier of its members which do not have their own locally defined modifier.
6060

6161
```swift
6262
public struct D {}
@@ -234,7 +234,7 @@ I propose to revise the access control on extensions by removing access modifier
234234
235235
fileprivate group {
236236
237-
// Every group memebr is `fileprivate`
237+
// Every group member is `fileprivate`
238238
func member1() {}
239239
func member2() {}
240240
func member3() {}
@@ -286,7 +286,7 @@ Iff the *access-level-modifier* is not present, the access modifier on extension
286286
```diff
287287
- extension SomeType : SomeProtocol {
288288
+ public extension SomeType : SomeProtocol {
289-
public func someMemeber()
289+
public func someMember()
290290
}
291291
```
292292

proposals/0138-unsaferawbufferpointer.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ for binding memory to a type for subsequent normal typed
3232
access. However, migration is not always straightforward because
3333
SE-0107 provided only minimal support for raw pointers. Extending raw
3434
pointer support to the `UnsafeBufferPointer` type will fill in this
35-
funcionality gap. This is especially important for code that currently
35+
functionality gap. This is especially important for code that currently
3636
views "raw" bytes of memory as
3737
`UnsafeBufferPointer<UInt8>`. Converting between `UInt8` and the
3838
client's element type at every API transition is difficult to do
@@ -69,7 +69,7 @@ is natural for the same type that encapsulates a raw pointer and
6969
length to also allow clients to view that memory as raw bytes without the
7070
need to explicitly bind the memory type each time memory is
7171
accessed. This would also improve performance in some cases that I've
72-
encoutered by avoiding array copies. Let's call this new type
72+
encountered by avoiding array copies. Let's call this new type
7373
`Unsafe[Mutable]RawBufferPointer`.
7474

7575
Any array could be viewed as `UnsafeRawBufferPointer`, and that raw
@@ -488,7 +488,7 @@ collection of bytes, so there's no loss in functionality:
488488
```swift
489489
public final class BufferedOutputByteStream: OutputByteStream {
490490
// FIXME: For inmemory implementation we should be share this buffer with OutputByteStream.
491-
// One way to do this is by allowing OuputByteStream to install external buffers.
491+
// One way to do this is by allowing OutputByteStream to install external buffers.
492492
private var contents = [UInt8]()
493493

494494
override final func writeImpl(_ bytes: UnsafeRawBufferPointer) {

proposals/0145-package-manager-version-pinning.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ specification in the manifest (which is the "requirement"). The meaning of pin
366366
connotes this transient relationship between the pin action and the underlying
367367
dependency.
368368

369-
In constrast, not only does lock have the wrong connotation, but it also is a
369+
In contrast, not only does lock have the wrong connotation, but it also is a
370370
heavily overloaded word which can lead to confusion. For example, if the package
371371
manager used POSIX file locking to prevent concurrent manipulation of packages
372372
(a feature we intend to implement), and we also referred to the pinning files as

proposals/0147-move-unsafe-initialize-from.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Therefore:
5454
- Over-allocating the destination buffer relative to `underestimatedCount` is valid and simply results in sequence underflow with potentially uninitialized buffer memory (a likely case with arrays that reserve more than they need).
5555
- The source sequence's actual count may exceed both `underestimatedCount` and the destination buffer size, resulting in sequence overflow. This is also valid and handled by returning an iterator to the uncopied elements as an overflow sequence.
5656

57-
A matching change should also be made to `UnsafeRawBufferPointer.initializeMemory(from:)`. The one difference is that for convenience this should return an `UnsafeMutableBufferPointer` of the (typed) intialized elements instead of an index into the raw buffer.
57+
A matching change should also be made to `UnsafeRawBufferPointer.initializeMemory(from:)`. The one difference is that for convenience this should return an `UnsafeMutableBufferPointer` of the (typed) initialized elements instead of an index into the raw buffer.
5858

5959
## Detailed design
6060

proposals/0156-subclass-existentials.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ let myViewController = MyViewController()
190190
myViewController.setup(UIViewController())
191191
```
192192

193-
The previous code continues to compile but still crashs if the Objective-C code calls a method of `UITableViewDataSource` or `UITableViewDelegate`. But if this proposal is accepted and implemented as-is, the Objective-C code will be imported in Swift 4 mode as:
193+
The previous code continues to compile but still crashes if the Objective-C code calls a method of `UITableViewDataSource` or `UITableViewDelegate`. But if this proposal is accepted and implemented as-is, the Objective-C code will be imported in Swift 4 mode as:
194194

195195
```swift
196196
class MyViewController {

proposals/0162-package-manager-custom-target-layouts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ remember.
9191
consider upgrading this to its own type to allow per-file build settings.
9292
The new type would conform to `CustomStringConvertible`, so existing
9393
declarations would continue to work (except where the strings were
94-
constructed programatically).
94+
constructed programmatically).
9595

9696
* `exclude`: This property can be used to exclude certain files and
9797
directories from being picked up as sources. Exclude paths are relative

proposals/0172-one-sided-ranges.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ variants of `Sequence.enumerated()` when you either want them non-zero-based
6464
i.e. `zip(1..., greeting)`, or want to flip the order i.e. `zip(greeting,
6565
0...)`.
6666

67-
This syntax would supercede the existing `prefix` and `suffix` operations that
67+
This syntax would supersede the existing `prefix` and `suffix` operations that
6868
take indices, which will be deprecated in a later release. Note that the
6969
versions that take distances are not covered by this proposal, and would remain.
7070

@@ -171,7 +171,7 @@ extension MutableCollection {
171171
where R.Bound == Index { get set }
172172
}
173173

174-
extension RangeReplaceableColleciton {
174+
extension RangeReplaceableCollection {
175175
public mutating func replaceSubrange<C: Collection, R: RangeExpression>(
176176
_ subrange: ${Range}<Index>, with newElements: C
177177
) where C.Iterator.Element == Iterator.Element, R.Bound == Index

proposals/0173-swap-indices.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protocol MutableCollection {
8282
The current `swap` is required to `fatalError` on attempts to swap an element
8383
with itself for implementation reasons. This pushes the burden to check this
8484
first onto the caller. While swapping an element with itself is often a logic
85-
errror (for example, in a `sort` algorithm where you have a fenceposts bug), it
85+
error (for example, in a `sort` algorithm where you have a fenceposts bug), it
8686
is occasionally a valid situation (for example, it can occur easily in an
8787
implementation of `shuffle`). This implementation removes the precondition.
8888

proposals/0174-filter-range-replaceable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ They may be be relying on an array being returned (albeit often in order to
7070
then transform it back into the original type), but this version will still
7171
be available (via the extension on `Sequence`) and will be called if forced
7272
through type context. The only code that will break is if this operation spans
73-
multple lines:
73+
multiple lines:
7474

7575
```swift
7676
// filtered used to be [Character], now String

proposals/0176-enforce-exclusive-access-to-memory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ automatically to avoid source-compatibility problems.
740740

741741
## Effect on ABI stability and resilience
742742

743-
In order to gain the performance and language-desing benefits of
743+
In order to gain the performance and language-design benefits of
744744
exclusivity, we must be able to assume that it is followed faithfully
745745
in various places throughout the ABI. Therefore, exclusivity must be
746746
enforced before we commit to a stable ABI, or else we'll be stuck with

proposals/0180-string-index-overhaul.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ let tagEnd = html.utf16[tagStart...].index(of: close)
129129
let tag = html[tagStart...tagEnd]
130130
```
131131

132-
A property and an intializer will be added to `String.Index`, exposing
132+
A property and an initializer will be added to `String.Index`, exposing
133133
the offset of the index in code units (currently only UTF-16) from the
134134
beginning of the string:
135135

proposals/0183-substring-affordances.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ case of `filter`).
7474

7575
## Effect on ABI stability
7676

77-
The switch from conrete to generic types needs to be made before ABI stability.
77+
The switch from concrete to generic types needs to be made before ABI stability.
7878

7979
## Alternatives considered
8080

proposals/0193-cross-module-inlining-and-specialization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ The closest analogue in C to `@usableFromInline` is a non-`static` function that
171171

172172
## Alternatives considered
173173

174-
One possible alterative would be to add a new compiler mode where _all_ declarations become implicitly `@inlinable`, and _all_ private and internal declarations become `@usableFromInline`.
174+
One possible alternative would be to add a new compiler mode where _all_ declarations become implicitly `@inlinable`, and _all_ private and internal declarations become `@usableFromInline`.
175175

176176
However, such a compilation mode would not solve the problem of delivering a stable ABI and standard library which can be deployed separately from user code. We _don't want_ all declaration bodies in the standard library to be available to the optimizer when building user code.
177177

proposals/0196-diagnostic-directives.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ On February 1, 2018 the Core Team decided to **accept** this proposal with
155155
slight revision over the [original proposal](https://github.com/swiftlang/swift-evolution/blob/ab0c22a2340be9bfcb82e6f237752b4d959a93b7/proposals/0196-diagnostic-directives.md).
156156

157157
The only revision over the original proposal is to change the syntax to use
158-
`#warning(<Message>)` instead of `#warning <Messsage>`. This fits well with
158+
`#warning(<Message>)` instead of `#warning <Message>`. This fits well with
159159
most of Swift's existing compiler directives, and was strongly supported in
160160
the [review discussion](https://forums.swift.org/t/se-0196-compiler-diagnostic-directives/8734).
161161

proposals/0198-playground-quicklook-api-revamp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ support the replacement of `CustomPlaygroundQuickLookable` with
261261
`CustomPlaygroundDisplayConvertible`. Instead, we intend for Swift 4.1 to be a
262262
deprecation period for these APIs, allowing any code bases which implement
263263
`CustomPlaygroundQuickLookable` to manually switch to the new protocol. While
264-
this migration may not be trivial programatically, it should -- in most cases --
264+
this migration may not be trivial programmatically, it should -- in most cases --
265265
be fairly trivial for someone to hand-migrate to
266266
`CustomPlaygroundDisplayConvertible`. During the deprecation period, the
267267
PlaygroundLogger framework will continue to honor implementations of

0 commit comments

Comments
 (0)