View bangbang.md

Introducing the !! operator to the Swift Standard Library

  • Proposal: SE-TBD
  • Author(s): [A bunch of folks](git urls)
  • Status: tbd
  • Review manager: tbd

Introduction

This proposal introduces a forced unwrapping operator to the Swift standard library. The operator provides text feedback on failed unwraps. It's a commonly implemented approach in the larger Swift Community and should be considered for official adoption.

View soroush.md

Introducing Guard-Catch

  • Proposal: SE-TBD
  • Author(s): Soroush Khanlou
  • Status: tbd
  • Review manager: tbd

Introduction

This proposal introduces a guard-catch statement to Swift, that is congruent to the existing guard-else statement with error catching support.

View forEachDispatch.swift
import Dispatch
/// Dispatch options for `forEach` loops
public enum ForEachClosureDispatch {
case sequential
case concurrent
}
extension Sequence {
/// Calls the given closure on each element in the sequence in the same order
View IDE.txt
/Applications/Xcode-beta.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation
IDEManageCertificates
IDEDistributionShouldCleanUpAfterExport
IDEProvisioningErrorDomain
IDEProvisioningError_UserInfoKey_IDEProvisionableName
IDEProvisioningError_UserInfoKey_IDEProvisioningUserAction
IDEProvisioningError_UserInfoKey_IDEProvisioningErrorAction
IDEProvisioningError_UserInfoKey_IDEProvisioningErrorTeam
IDEProvisioningError_UserInfoKey_IDEProvisioningErrorPlatform
View dispatch.md
View keywords.md

Introducing Role Keywords to Protocol Implementations to Reduce Code Errors

Introduction

This proposal eliminates several categories of user errors. It mitigates subtle, hard-to-find bugs in Swift protocol code that compile without warning. Introducing "role" keywords that document code intent will increase protocol safety and enable the compiler to test for issues by matching desired behaviors against actual code.

View circleintersection.swift
import UIKit
/// High precedence
precedencegroup HighPrecedence { higherThan: BitwiseShiftPrecedence }
/// Exponentiation operator
infix operator **: HighPrecedence
extension CGFloat {
/// Returns base ^^ exp
View tick.swift
import UIKit
import PlaygroundSupport
@objc class ViewController: UIViewController {
public func bbi(_ title: String, _ action: Selector) -> UIBarButtonItem {
return UIBarButtonItem(title: title, style: .plain, target: self, action: action)
}
var timer: Timer? = nil
var timeRemaining: Double = 0
View partition.swift
extension Collection where Iterator.Element: Comparable {
/// Returns an eagerly composed array of ordered elements
/// split at each point where a user-supplied predicate
/// evaluates to true.
///
/// ```
/// [1, 2, 2, 3, 3, 3, 1]
/// .partitioned(at: { $0 != $1.last! })
/// // [[1], [2, 2], [3, 3, 3], [1]]
///
View sleepsort.swift
import Foundation
import Dispatch
public struct SleepSort {
/// Dispatches a block after `secs` seconds
static func dispatch(after secs: Double, block: @escaping () -> Void) {
#if os(Linux)
let delay = Double(CLOCKS_PER_SEC) * secs
#else
let delay = Double(NSEC_PER_SEC) * secs