Skip to content

Commit 11374d3

Browse files
ericalattner
authored andcommitted
Pilot attempt for 'aggressive edits' on CHANGELOG.md (#4803)
1 parent 2a21011 commit 11374d3

File tree

1 file changed

+32
-55
lines changed

1 file changed

+32
-55
lines changed

CHANGELOG.md

Lines changed: 32 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Swift 3.1
2222

2323
* [SE-0045][]:
2424

25-
The `Sequence` protocol now includes two new members, `prefix(while:)` and
26-
`drop(while:)`. `prefix(while:)` is used to request the longest subsequence
27-
satisfying a predicate. `drop(while:)` is used to request the subsequence
28-
remaining after dropping the longest subsequence satisfying a predicate.
25+
The `Sequence` protocol adds new members `prefix(while:)` and
26+
`drop(while:)`. `prefix(while:)` requests the longest subsequence
27+
satisfying a predicate. `drop(while:)` requests the remaining subsequence
28+
after dropping the longest subsequence satisfying a predicate.
2929

3030
Swift 3.0
3131
---------
@@ -34,25 +34,24 @@ Swift 3.0
3434

3535
* [SE-0101][]:
3636

37-
The functions `sizeof()`, `strideof()`, and `alignof()` have been removed.
38-
Instead, these memory layout properties for a type `T` are now spelled
37+
The functions `sizeof()`, `strideof()`, and `alignof()` have been removed.
38+
Memory layout properties for a type `T` are now spelled
3939
`MemoryLayout<T>.size`, `MemoryLayout<T>.stride`, and
4040
`MemoryLayout<T>.alignment`, respectively.
4141

4242
* [SE-0136][]:
4343

44-
The functions `sizeofValue()`, `strideofValue()`, and `alignofValue()` have
45-
been renamed `MemoryLayout.size(ofValue:)`, `MemoryLayout.stride(ofValue:)`,
44+
The functions `sizeofValue()`, `strideofValue()`, and `alignofValue()` have been renamed to `MemoryLayout.size(ofValue:)`, `MemoryLayout.stride(ofValue:)`,
4645
and `MemoryLayout.alignment(ofValue:)`.
4746

4847
* [SE-0125][]:
4948

5049
The functions `isUniquelyReferenced()` and `isUniquelyReferencedNonObjC()`
51-
have been removed. The function `isKnownUniquelyReferenced()` should be called
52-
instead. The class `NonObjectiveCBase` which classes using
53-
`isUniquelyReferenced()` needed to inherit from was removed.
50+
have been removed. Call the function `isKnownUniquelyReferenced()` instead.
51+
52+
Classes using `isUniquelyReferenced()` needed to inherit from `NonObjectiveCBase`. The `NonObjectiveCBase` class has been removed.
5453

55-
The method `ManagedBufferPointer.holdsUniqueReference` was renamed to
54+
The method `ManagedBufferPointer.holdsUniqueReference` has been renamed to
5655
`ManagedBufferPointer.isUniqueReference`.
5756

5857
```swift
@@ -77,8 +76,7 @@ Swift 3.0
7776

7877
* [SE-0124][]:
7978

80-
The initializers on `Int` and `UInt` accepting an `ObjectIdentifier` now need
81-
to be spelled with an explicit `bitPattern` label.
79+
Initializers on `Int` and `UInt` that accept an `ObjectIdentifier` must now use an explicit `bitPattern` label.
8280

8381
```swift
8482
let x: ObjectIdentifier = ...
@@ -94,9 +92,7 @@ Swift 3.0
9492

9593
* [SE-0120][]:
9694

97-
The collection methods `partition()` and `partition(isOrderedBefore:)` have
98-
been removed from Swift. They were replaced by the method `partition(by:)`
99-
which takes a unary predicate.
95+
The collection methods `partition()` and `partition(isOrderedBefore:)` have been removed from Swift. They are replaced by the method `partition(by:)` which takes a unary predicate.
10096

10197
Calls to the `partition()` method can be replaced by the following code.
10298

@@ -112,16 +108,11 @@ Swift 3.0
112108

113109
* [SE-0103][]:
114110

115-
Closure parameters are non-escaping by default, rather than explicitly being
116-
annotated `@noescape`. Use `@escaping` to say that a closure parameter may
117-
escape. `@autoclosure(escaping)` is now spelled `@autoclosure @escaping`.
118-
`@noescape` and `@autoclosure(escaping)` are deprecated.
111+
Closure parameters are now non-escaping by default and do not require `@noescape` annotation. Use `@escaping` to indicate that a closure parameter can escape. `@autoclosure(escaping)` is now spelled `@autoclosure @escaping`. `@noescape` and `@autoclosure(escaping)` are deprecated.
119112

120113
* [SE-0115][]:
121114

122-
To clarify the role of `*LiteralConvertible` protocols, they have
123-
been renamed to `ExpressibleBy*Literal`. No requirements of these
124-
protocols have changed.
115+
To clarify their roles, `*LiteralConvertible` protocols have been renamed to `ExpressibleBy*Literal`. The protocol requirements are unchanged.
125116

126117
* [SE-0107][]:
127118

@@ -130,17 +121,14 @@ Swift 3.0
130121
to `UnsafePointer<U>` has been disallowed. `Unsafe[Mutable]RawPointer`
131122
provides an API for untyped memory access, and an API for binding memory
132123
to a type. Binding memory allows for safe conversion between pointer types.
133-
See `bindMemory(to:capacity:)`, `assumingMemoryBound(to:)`, and
134-
`withMemoryRebound(to:capacity:)`.
124+
125+
For detailed instructions on how to migrate your code to the new API refer to the [UnsafeRawPointer migration guide](https://swift.org/migration-guide/se-0107-migrate.html). See also: See `bindMemory(to:capacity:)`, `assumingMemoryBound(to:)`, and
126+
`withMemoryRebound(to:capacity:)`.
135127

136128
* [SE-0096][]:
137129

138-
The `dynamicType` keyword has been removed from Swift. In its place a new
139-
primitive function `type(of:)` has been added to the language. Existing code
140-
that uses the `.dynamicType` member to retrieve the type of an expression
141-
should migrate to this new primitive. Code that is using `.dynamicType` in
142-
conjunction with `sizeof` should migrate to the `MemoryLayout` structure
143-
provided by [SE-0101][].
130+
The `dynamicType` keyword has been removed from Swift. It's replaced by a new primitive function `type(of:)`. Existing code
131+
using the `.dynamicType` member to retrieve the type of an expression should migrate to this new primitive. Code using `.dynamicType` in conjunction with `sizeof` should migrate to the `MemoryLayout` structure introduced by [SE-0101][].
144132

145133
* [SE-0113][]:
146134

@@ -151,32 +139,26 @@ Swift 3.0
151139
mutating func round( _ rule: FloatingPointRoundingRule)
152140
```
153141

154-
These bind the IEEE 754 roundToIntegral operations. They provide the
155-
functionality of the C / C++ `round()`, `ceil()`, `floor()`, and `trunc()`
156-
functions and other rounding operations as well.
142+
These methods bind the IEEE 754 roundToIntegral operations. They provide the functionality of the C / C++ `round()`, `ceil()`, `floor()`, and `trunc()` functions along with other rounding operations.
157143

158-
As a follow-on to the work of [SE-0113][] and [SE-0067][], the following
159-
mathematical operations in the `Darwin.C` and `glibc` modules now operate
160-
on any type conforming to `FloatingPoint`: `fabs`, `sqrt`, `fma`,
144+
Following onto [SE-0113][] and [SE-0067][], the following `Darwin.C` and `glibc` module mathematical operations now operate on any type conforming to `FloatingPoint`: `fabs`, `sqrt`, `fma`,
161145
`remainder`, `fmod`, `ceil`, `floor`, `round`, and `trunc`.
162146

163-
See also the changes associated with [SE-0067][].
147+
See also: the changes associated with [SE-0067][].
164148

165149
* [SE-0067][]:
166150

167151
The `FloatingPoint` protocol has been expanded to include most IEEE 754
168152
required operations. A number of useful properties have been added to the
169-
protocol as well, representing quantities like the largest finite value or
153+
protocol, representing quantities like the largest finite value or
170154
the smallest positive normal value (these correspond to the macros such as
171155
FLT_MAX defined in C).
172156

173-
While almost all of the changes are additive, there are four changes that
174-
will impact existing code:
157+
While almost all of the changes are additive, four changes impact existing code:
175158

176159
- The `%` operator is no longer available for `FloatingPoint` types. It
177-
was difficult to use correctly, and its semantics did not actually match
178-
those of the corresponding integer operation, making it something of an
179-
attractive nuisance. The new method `formTruncatingRemainder(dividingBy:)`
160+
was difficult to use correctly and its semantics did not match
161+
those of the corresponding integer operation. This made it something of an attractive nuisance. The new method `formTruncatingRemainder(dividingBy:)`
180162
provides the old semantics if they are needed.
181163

182164
- The static property `.NaN` has been renamed `.nan`.
@@ -186,30 +168,25 @@ Swift 3.0
186168

187169
- The predicate `isSignaling` has been renamed `isSignalingNaN`.
188170

189-
See also the changes associated with [SE-0113][].
171+
See also: the changes associated with [SE-0113][].
190172

191173
* [SE-0111][]:
192174

193-
Argument labels have been removed from Swift function types. Instead, they are
194-
part of the name of a function, subscript, or initializer. Calls to a function
195-
or initializer, or uses of a subscript, still require argument labels, as they
196-
always have:
175+
Argument labels have been removed from Swift function types. They are now
176+
part of the name of a function, subscript, or initializer. Calls to a function or initializer, and subscript uses, still require argument labels as they always have:
197177

198178
```swift
199179
func doSomething(x: Int, y: Int) { }
200180
doSomething(x: 0, y: 0) // argument labels are required
201181
```
202182

203-
However, unapplied references to functions or initializers no longer carry
204-
argument labels. For example:
183+
Unapplied references to functions or initializers no longer carry argument labels. For example:
205184

206185
```swift
207186
let f = doSomething(x:y:) // inferred type is now (Int, Int) -> Void
208187
```
209188

210-
Additionally, explicitly-written function types can no longer carry argument
211-
labels, although one can still provide parameter name for documentation
212-
purposes using the '_' in the argument label position:
189+
Explicitly-written function types can no longer carry argument labels. You can still provide parameter names for documentation purposes using the '_' in the argument label position:
213190

214191
```swift
215192
typealias CompletionHandler =

0 commit comments

Comments
 (0)