Skip to content

Changelog entries #4150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,73 @@ Note: This is in reverse chronological order, so newer entries are added to the
Swift 3.0
---------

* [SE-125)(https://github.com/apple/swift-evolution/blob/master/proposals/0125-remove-nonobjectivecbase.md)

The functions `isUniquelyReferenced()` and `isUniquelyReferencedNonObjC()`
have been removed. The function `isKnownUniquelyReferenced()` should be called
instead. The class `NonObjectiveCBase` which classes using
`isUniquelyReferenced()` needed to inherit from was removed.

The method `ManagedBufferPointer.holdsUniqueReference` was renamed to
`ManagedBufferPointer.isUniqueReference`.

```swift
// old
class SwiftKlazz : NonObjectiveCBase {}
expectTrue(isUniquelyReferenced(SwiftKlazz()))

var managedPtr : ManagedBufferPointer = ...
if !managedPtr.holdsUniqueReference() {
print("not unique")
}


// new
class SwiftKlazz {}
expectTrue(isKnownUniquelyReferenced(SwiftKlazz()))

var managedPtr : ManagedBufferPointer = ...
if !managedPtr.isUniqueReference() {
print("not unique")
}

```

* [SE-124](https://github.com/apple/swift-evolution/blob/master/proposals/0124-bitpattern-label-for-int-initializer-objectidentfier.md)

The initializers on `Int` and `UInt` accepting an `ObjectIdentifier` now need
to be spelled with an explicit `bitPattern` label.

```swift
let x: ObjectIdentifier = ...

// old
let u = UInt(x)
let i = Int(x)

// new
let u = UInt(bitPattern: x)
let i = Int(bitPattern: x)
```

* [SE-120](https://github.com/apple/swift-evolution/blob/master/proposals/0120-revise-partition-method.md)

The collection methods `partition()` and `partition(isOrderedBefore:)` have
been removed from Swift. They were replaced by the method `partition(by:)`
which takes an unary predicate.

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

```swift
// old
let p = c.partition()

// new
let p = c.first.flatMap({ first in
c.partition(by: { $0 >= first })
}) ?? c.startIndex
```

* [SE-103](https://github.com/apple/swift-evolution/blob/master/proposals/0103-make-noescape-default.md)

Closure parameters are non-escaping by default, rather than explicitly being
Expand Down