2
2
3
3
Learn what functionality is available in older language modes.
4
4
5
- This book describes Swift 5.10,
6
- the default version of Swift that's included in Xcode 15.3.
7
- You can use Xcode 15.3 to build targets
8
- that are written in either 5.10, Swift 4.2, or Swift 4.
9
-
10
- When you use Xcode 15.3 to build Swift 4 and Swift 4.2 code,
11
- most Swift 5.10 functionality is available.
5
+ This book describes Swift 6,
6
+ the default version of Swift that's included in Xcode XXX.
7
+ You can use the Swift 6 compiler to build code
8
+ that's written in Swift 6, Swift 5, Swift 4.2, or Swift 4.
9
+
10
+ When you use the Swift 6 compiler
11
+ to build code that uses the Swift 5 language mode,
12
+ you can use the new features from Swift 6 ---
13
+ they're enabled either by default or by an upcoming feature flag.
14
+ However, to enable strict concurrency checking,
15
+ you need to upgrade to the Swift 6 language mode.
16
+
17
+ In addition,
18
+ when you use Xcode 15.3 to build Swift 4 and Swift 4.2 code,
19
+ most Swift 5 functionality is still available.
12
20
That said,
13
- the following changes are available only to code that uses 5.10 or later:
21
+ the following changes are available only to code
22
+ that uses the Swift 5 language mode:
14
23
15
24
- Functions that return an opaque type require the Swift 5.1 runtime.
16
25
- The ` try? ` expression doesn't introduce an extra level of optionality
@@ -20,18 +29,18 @@ the following changes are available only to code that uses 5.10 or later:
20
29
For example, ` UInt64(0xffff_ffff_ffff_ffff) ` evaluates to the correct value
21
30
rather than overflowing.
22
31
23
- Concurrency requires 5.10 or later,
32
+ Concurrency requires the Swift 5 language mode
24
33
and a version of the Swift standard library
25
34
that provides the corresponding concurrency types.
26
35
On Apple platforms, set a deployment target
27
36
of at least iOS 13, macOS 10.15, tvOS 13, or watchOS 6.
28
37
29
- A target written in 5.10 can depend on
30
- a target that's written in Swift 4.2 or Swift 4,
38
+ A target written in Swift 6 can depend on
39
+ a target that's written in Swift 5, Swift 4.2 or Swift 4,
31
40
and vice versa.
32
41
This means, if you have a large project
33
42
that's divided into multiple frameworks,
34
- you can migrate your code from Swift 4 to 5.10
43
+ you can migrate your code to a newer language version
35
44
one framework at a time.
36
45
37
46
<!--
0 commit comments