What's new in Swift?
About 18 min
What's new in Swift? 관련
HACKING WITH SWIFT
What's new in Swift?
Here you can find detailed descriptions of all the major Swift changes from launch through to now, including example code and downloadable playgrounds you can run in Xcode.
Changes in Swift 6.0
Complete concurrency enabled by default | Changes in Swift 6.0
Complete concurrency enabled by default
count(where:) | Changes in Swift 6.0
count(where:)
Typed throws | Changes in Swift 6.0
Typed throws
Pack iteration | Changes in Swift 6.0
Pack iteration
Add Collection Operations on Noncontiguous Elements | Changes in Swift 6.0
Add Collection Operations on Noncontiguous Elements
Access-level modifiers on import declarations | Changes in Swift 6.0
Access-level modifiers on import declarations
Upgrades for noncopyable types | Changes in Swift 6.0
Upgrades for noncopyable types
128-bit Integer Types | Changes in Swift 6.0
128-bit Integer Types
BitwiseCopyable | Changes in Swift 6.0
BitwiseCopyable
Changes in Swift 5.10
Data races are now clearly diagnosed | Changes in Swift 5.10
Data races are now clearly diagnosed
Allow Protocols to be Nested in Non-Generic Contexts | Changes in Swift 5.10
Allow Protocols to be Nested in Non-Generic Contexts
Deprecate @UIApplicationMain and @NSApplicationMain | Changes in Swift 5.10
Deprecate @UIApplicationMain and @NSApplicationMain
Refined actor initialization and deinitialization | Changes in Swift 5.10
Refined actor initialization and deinitialization
Changes in Swift 5.9
if and switch expressions | Changes in Swift 5.9
if and switch expressions
Value and Type Parameter Packs | Changes in Swift 5.9
Value and Type Parameter Packs
Macros | Changes in Swift 5.9
Macros
Noncopyable structs and enums | Changes in Swift 5.9
Noncopyable structs and enums
consume operator to end the lifetime of a variable binding | Changes in Swift 5.9
consume operator to end the lifetime of a variable binding
Convenience Async[Throwing]Stream.makeStream methods | Changes in Swift 5.9
Convenience Async[Throwing]Stream.makeStream methods
Add sleep(for:) to Clock | Changes in Swift 5.9
Add sleep(for:) to Clock
Discarding task groups | Changes in Swift 5.9
Discarding task groups
Changes in Swift 5.8
Lift all limitations on variables in result builders | Changes in Swift 5.8
Lift all limitations on variables in result builders
Function back deployment | Changes in Swift 5.8
Function back deployment
Allow implicit self for weak self captures, after self is unwrapped | Changes in Swift 5.8
Allow implicit self for weak self captures, after self is unwrapped
Concise magic file names | Changes in Swift 5.8
Concise magic file names
Opening existential arguments to optional parameters | Changes in Swift 5.8
Opening existential arguments to optional parameters
Collection downcasts in cast patterns are now supported | Changes in Swift 5.8
Collection downcasts in cast patterns are now supported
Changes in Swift 5.7
if let shorthand for unwrapping optionals | Changes in Swift 5.7
if let shorthand for unwrapping optionals
Multi-statement closure type inference | Changes in Swift 5.7
Multi-statement closure type inference
Clock, Instant, and Duration | Changes in Swift 5.7
Clock, Instant, and Duration
Regular expressions | Changes in Swift 5.7
Regular expressions
Type inference from default expressions | Changes in Swift 5.7
Type inference from default expressions
Concurrency in top-level code | Changes in Swift 5.7
Concurrency in top-level code
Opaque parameter declarations | Changes in Swift 5.7
Opaque parameter declarations
Structural opaque result types | Changes in Swift 5.7
Structural opaque result types
Unlock existentials for all protocols | Changes in Swift 5.7
Unlock existentials for all protocols
Lightweight same-type requirements for primary associated types | Changes in Swift 5.7
Lightweight same-type requirements for primary associated types
Constrained existential types | Changes in Swift 5.7
Constrained existential types
Distributed actor isolation | Changes in Swift 5.7
Distributed actor isolation
buildPartialBlock for result builders | Changes in Swift 5.7
buildPartialBlock for result builders
Implicitly opened existentials | Changes in Swift 5.7
Implicitly opened existentials
Unavailable from async attribute | Changes in Swift 5.7
Unavailable from async attribute
Changes in Swift 5.6
Introduce existential any | Changes in Swift 5.6
Introduce existential any
Type placeholders | Changes in Swift 5.6
Type placeholders
Allow coding of non String/Int keyed Dictionary into a KeyedContainer | Changes in Swift 5.6
Allow coding of non String/Int keyed Dictionary into a KeyedContainer
Unavailability condition | Changes in Swift 5.6
Unavailability condition
More concurrency changes | Changes in Swift 5.6
More concurrency changes
Plugins for Swift Package Manager | Changes in Swift 5.6
Plugins for Swift Package Manager
Changes in Swift 5.5
Async await | Changes in Swift 5.5
Async await
Async sequences | Changes in Swift 5.5
Async sequences
Effectful read-only properties | Changes in Swift 5.5
Effectful read-only properties
Structured concurrency | Changes in Swift 5.5
Structured concurrency
async let bindings | Changes in Swift 5.5
async let bindings
Continuations for interfacing async tasks with synchronous code | Changes in Swift 5.5
Continuations for interfacing async tasks with synchronous code
Actors | Changes in Swift 5.5
Actors
Global actors | Changes in Swift 5.5
Global actors
Sendable and @Sendable closures | Changes in Swift 5.5
Sendable and @Sendable closures
if for postfix member expressions | Changes in Swift 5.5
if for postfix member expressions
Interchangeable use of CGFloat and Double types | Changes in Swift 5.5
Interchangeable use of CGFloat and Double types
Codable synthesis for enums with associated values | Changes in Swift 5.5
Codable synthesis for enums with associated values
lazy now works in local contexts | Changes in Swift 5.5
lazy now works in local contexts
Extending property wrappers to function and closure parameters | Changes in Swift 5.5
Extending property wrappers to function and closure parameters
Extending static member lookup in generic contexts | Changes in Swift 5.5
Extending static member lookup in generic contexts
Changes in Swift 5.4
Improved implicit member syntax | Changes in Swift 5.4
Improved implicit member syntax
Multiple variadic parameters in functions | Changes in Swift 5.4
Multiple variadic parameters in functions
Local functions now support overloading | Changes in Swift 5.4
Local functions now support overloading
Creating variables that call a function of the same name | Changes in Swift 5.4
Creating variables that call a function of the same name
Result builders | Changes in Swift 5.4
Result builders
Property wrappers are now supported for local variables | Changes in Swift 5.4
Property wrappers are now supported for local variables
Packages can now declare executable targets | Changes in Swift 5.4
Packages can now declare executable targets
Changes in Swift 5.3
Multi-pattern catch clauses | Changes in Swift 5.3
Multi-pattern catch clauses
Multiple trailing closures | Changes in Swift 5.3
Multiple trailing closures
Synthesized Comparable conformance for enums | Changes in Swift 5.3
Synthesized Comparable conformance for enums
self is no longer required in many places | Changes in Swift 5.3
self is no longer required in many places
Type-based program entry points | Changes in Swift 5.3
Type-based program entry points
where clauses on contextually generic declarations | Changes in Swift 5.3
where clauses on contextually generic declarations
Enum cases as protocol witnesses | Changes in Swift 5.3
Enum cases as protocol witnesses
Refined didSet semantics | Changes in Swift 5.3
Refined didSet semantics
A new Float16 type | Changes in Swift 5.3
A new Float16 type
Swift Package Manager gains binary dependencies, resources, and more | Changes in Swift 5.3
Swift Package Manager gains binary dependencies, resources, and more
Changes in Swift 5.2
Key path expressions as functions | Changes in Swift 5.2
Key path expressions as functions
Callable values of user-defined nominal types | Changes in Swift 5.2
Callable values of user-defined nominal types
Subscripts can now declare default arguments | Changes in Swift 5.2
Subscripts can now declare default arguments
Lazy filtering order is now reversed | Changes in Swift 5.2
Lazy filtering order is now reversed
New and improved diagnostics | Changes in Swift 5.2
New and improved diagnostics
Changes in Swift 5.1
Improvements to synthesized memberwise initializers | Changes in Swift 5.1
Improvements to synthesized memberwise initializers
Implicit returns from single-expression functions | Changes in Swift 5.1
Implicit returns from single-expression functions
Universal Self | Changes in Swift 5.1
Universal Self
Opaque return types | Changes in Swift 5.1
Opaque return types
Static and class subscripts | Changes in Swift 5.1
Static and class subscripts
Warnings for ambiguous none cases | Changes in Swift 5.1
Warnings for ambiguous none cases
Matching optional enums against non-optionals | Changes in Swift 5.1
Matching optional enums against non-optionals
Ordered collection diffing | Changes in Swift 5.1
Ordered collection diffing
Creating uninitialized arrays | Changes in Swift 5.1
Creating uninitialized arrays
Changes in Swift 5.0
Raw strings | Changes in Swift 5.0
Raw strings
A standard Result type | Changes in Swift 5.0
A standard Result type
Customizing string interpolation | Changes in Swift 5.0
Customizing string interpolation
Dynamically callable types | Changes in Swift 5.0
Dynamically callable types
Handling future enum cases | Changes in Swift 5.0
Handling future enum cases
Flattening nested optionals resulting from try? | Changes in Swift 5.0
Flattening nested optionals resulting from try?
Checking for integer multiples | Changes in Swift 5.0
Checking for integer multiples
Transforming and unwrapping dictionary values with compactMapValues() | Changes in Swift 5.0
Transforming and unwrapping dictionary values with compactMapValues()
Changes in Swift 4.2
Derived collections of enum cases | Changes in Swift 4.2
Derived collections of enum cases
Warning and error diagnostic directives | Changes in Swift 4.2
Warning and error diagnostic directives
Dynamic member look up | Changes in Swift 4.2
Dynamic member look up
Enhanced conditional conformances | Changes in Swift 4.2
Enhanced conditional conformances
Random number generation and shuffling | Changes in Swift 4.2
Random number generation and shuffling
Simpler, more secure hashing | Changes in Swift 4.2
Simpler, more secure hashing
Checking sequence elements match a condition | Changes in Swift 4.2
Checking sequence elements match a condition
In-place collection element removal | Changes in Swift 4.2
In-place collection element removal
Boolean toggling | Changes in Swift 4.2
Boolean toggling
Changes in Swift 4.1
Synthesized Equatable and Hashable | Changes in Swift 4.1
Synthesized Equatable and Hashable
Key decoding strategies for Codable | Changes in Swift 4.1
Key decoding strategies for Codable
Conditional conformances | Changes in Swift 4.1
Conditional conformances
Recursive constraints on associated types | Changes in Swift 4.1
Recursive constraints on associated types
Build configuration import testing | Changes in Swift 4.1
Build configuration import testing
Target environment testing | Changes in Swift 4.1
Target environment testing
flatMap is now (partly) compactMap() | Changes in Swift 4.1
flatMap is now (partly) compactMap()
Changes in Swift 4.0
Encoding and decoding data using Codable | Changes in Swift 4.0
Encoding and decoding data using Codable
Multi-line string literals | Changes in Swift 4.0
Multi-line string literals
Improved keypaths for key-value coding | Changes in Swift 4.0
Improved keypaths for key-value coding
Improved dictionary functionality | Changes in Swift 4.0
Improved dictionary functionality
Strings are collections again | Changes in Swift 4.0
Strings are collections again
One-sided ranges | Changes in Swift 4.0
One-sided ranges
Changes in Swift 3.1
Concrete constrained extensions | Changes in Swift 3.1
Concrete constrained extensions
Generics with nested types | Changes in Swift 3.1
Generics with nested types
All function parameters have labels unless you request otherwise | Changes in Swift 3.1
Sequences get prefix(while:) and drop(while:) methods
Changes in Swift 3.0
All function parameters have labels unless you request otherwise | Changes in Swift 3.0
All function parameters have labels unless you request otherwise
Omit needless words | Changes in Swift 3.0
Omit needless words
UpperCamelCase has been replaced with lowerCamelCase for enums and properties | Changes in Swift 3.0
UpperCamelCase has been replaced with lowerCamelCase for enums and properties
Swifty importing of C functions | Changes in Swift 3.0
Swifty importing of C functions
Verbs and nouns | Changes in Swift 3.0
Verbs and nouns
Changes in Swift 2.2
++ and -- are deprecated | Changes in Swift 2.2
++ and -- are deprecated
Traditional C-style for loops are deprecated | Changes in Swift 2.2
Traditional C-style for loops are deprecated
Comparing tuples | Changes in Swift 2.2
Comparing tuples
Tuple splat syntax is deprecated | Changes in Swift 2.2
Tuple splat syntax is deprecated
More keywords can be used as argument labels | Changes in Swift 2.2
More keywords can be used as argument labels
Variable parameters have been deprecated | Changes in Swift 2.2
Variable parameters have been deprecated
Renamed debug identifiers: line, function, file | Changes in Swift 2.2
Renamed debug identifiers: line, function, file
Stringified selectors are deprecated | Changes in Swift 2.2
Stringified selectors are deprecated
Compile-time Swift version checking | Changes in Swift 2.2
Compile-time Swift version checking
Changes in Swift 2.1
String interpolation can now include string literals | Changes in Swift 2.1
String interpolation can now include string literals
Changes in Swift 2.0
Throwing errors | Changes in Swift 2.0
Throwing errors
Use the guard keyword for early returns | Changes in Swift 2.0
Use the guard keyword for early returns
Measure strings using their character count | Changes in Swift 2.0
Measure strings using their character count
Use the defer keyword to delay work until your scope exits | Changes in Swift 2.0
Use the defer keyword to delay work until your scope exits
Mutability warnings | Changes in Swift 2.0
Mutability warnings
Checking API availability | Changes in Swift 2.0
Checking API availability
Changes in Swift 1.2
The zip() function joins two sequences | Changes in Swift 1.2
The zip() function joins two sequences
The flatMap() method transforms optionals and arrays | Changes in Swift 1.2
The flatMap() method transforms optionals and arrays
Closures can now be marked @noescape | Changes in Swift 1.2
Closures can now be marked @noescape
Classes can now have static methods and properties | Changes in Swift 1.2
Classes can now have static methods and properties
Constants no longer require immediate initialization | Changes in Swift 1.2
Constants no longer require immediate initialization
A new Set data structure | Changes in Swift 1.2
A new Set data structure
Implicit bridging has been reduced | Changes in Swift 1.2
Implicit bridging has been reduced
Multiple if let bindings | Changes in Swift 1.2
Multiple if let bindings
Typecasting now includes as! | Changes in Swift 1.2
Typecasting now includes as!