View forjb.swift
import UIKit
extension String {
func toAttributed() -> NSAttributedString {
return NSAttributedString(string: self)
}
}
extension NSAttributedString {
func toImage(withAlpha alpha: CGFloat = 1.0) -> UIImage {
View Boolean.md

Default Values of a Boolean

Java: Default value for a boolean primitive is false. (For Boolean object, null)

View comparison.txt
A0 B0 Optional("A0") Optional("A0")
A0 B1 Optional("A0") Optional("A0")
A0 B2 Optional("A0") Optional("A0")
A0 B3 Optional("A0") Optional("A0")
A0 B4 Optional("A0") Optional("A0")
A0 B5 Optional("A0") Optional("A0")
A1 B0 Optional("A0") Optional("A0")
A1 B1 Optional("A1") Optional("A1")
A1 B2 Optional("A1") Optional("A1")
A1 B3 Optional("A1") Optional("A1")
View bangbang.md

Introducing the !! "Unwrap or Die" operator to the Swift Standard Library

Introduction

This proposal introduces an annotated forced unwrapping operator to the Swift standard library, completing the ?, ??, and ! family with !!. The "unwrap or die" operator provides text feedback on failed unwraps, to support defensive programming. This operator is commonly implemented 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