- Proposal: SE-NNNN
- Authors: Becca Royal-Gordon
- Review Manager: TBD
- Status: Awaiting implementation (but only of resilience support)
- Implementation: In main and release/6.0, behind the
ObjCImplementation
experimental feature flag - Upcoming Feature Flag:
ObjCImplementation
- Proposal: SE-NNNN
- Authors: Becca Royal-Gordon, Varun Gandhi
- Review Manager: TBD
- Implementation: In master behind
-Xfrontend -enable-cross-import-overlays
- Status: Prototyped behind a feature flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Passes a pointer to an uninitialized instance of `type` to `body`. | |
/// If `body` returns `true`, indicating that the memory has now been | |
/// initialized, returns the instance; otherwise returns `nil`. | |
@usableFromInline func withUninitialized<T>( | |
_ type: T.Type, do body: (UnsafeMutablePointer<T>) -> Bool | |
) -> T? { | |
let ptr = UnsafeMutablePointer<T>.allocate(capacity: 1) | |
defer { ptr.deallocate() } | |
guard body(ptr) else { |
- Proposal: SE-NNNN
- Authors: Brent Royal-Gordon, Dave DeLong
- Review Manager: TBD
- Status: Awaiting review
- Implementation: apple/swift#25656
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct _AppendingStringInterpolation<Result: ExpressibleByStringInterpolation> { | |
var result: Result | |
} | |
protocol ExpressibleByAppendingStringInterpolation: ExpressibleByStringInterpolation where StringInterpolation == _AppendingStringInterpolation<Self> { | |
init(stringLiteral: String) | |
mutating func append(_ value: Self) | |
} | |
extension ExpressibleByAppendingStringInterpolation where StringInterpolation == _AppendingStringInterpolation<Self> { |
- Proposal: SE-0200
- Author: John Holdsworth, Brent Royal-Gordon, Erica Sadun
- Review Manager: Doug Gregor
- Status: Returned for revision
- Implementation: apple/swift#13055
- Bugs: SR-6362 Needs Update for New Design
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UserDefaults+Codable.swift | |
// Converter UltraLight | |
// | |
// Created by Brent Royal-Gordon on 8/31/17. | |
// Copyright © 2017 Architechies. All rights reserved. | |
// MIT-licensed, go nuts with it. | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UICollectionViewLayout+indexPaths.swift | |
// Converter Calc | |
// | |
// Created by Brent Royal-Gordon on 7/26/17. | |
// Copyright © 2017 Architechies. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import ExplicitlyConvertible | |
let i8: Int8 = 8 | |
let i64: Int64 = 64 | |
i64 + ^i8 // => 72 | |
struct Person { | |
var name: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First, let's test out the basic design. This is basically just an | |
// HList. | |
// This recurses to the right because that makes subscripting simpler, | |
// at the cost of making appending impossible to generalize. | |
public protocol TupleProtocol: RandomAccessCollection | |
where Index == Int, IndexDistance == Int, Element == Any | |
{ | |
associatedtype First | |
associatedtype Rest //: TupleProtocol |
NewerOlder