Skip to content

Commit d733c2f

Browse files
committed
Start adding Swift 6 to the intro chapter
1 parent 041e24b commit d733c2f

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

TSPL.docc/GuidedTour/Compatibility.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@
22

33
Learn what functionality is available in older language modes.
44

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 Xcode XXX to build targets
8+
that are written in Swift 6, Swift 5, Swift 4.2, or Swift 4.
9+
10+
When you use Xcode XXX to build Swift 5 code,
11+
most Swift 6 features are available ---
12+
the following changes are available only to code that uses Swift 6 or later:
13+
14+
- XXX all the SE proposals that have feature flags
15+
- XXX strict concurrency
16+
- XXX existentials syntax?
17+
18+
In addition,
19+
when you use Xcode 15.3 to build Swift 4 and Swift 4.2 code,
20+
most Swift 5 functionality is still available.
1221
That said,
13-
the following changes are available only to code that uses 5.10 or later:
22+
the following changes are available only to code that uses Swift 5:
1423

1524
- Functions that return an opaque type require the Swift 5.1 runtime.
1625
- 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:
2029
For example, `UInt64(0xffff_ffff_ffff_ffff)` evaluates to the correct value
2130
rather than overflowing.
2231

23-
Concurrency requires 5.10 or later,
32+
Concurrency requires Swift 5
2433
and a version of the Swift standard library
2534
that provides the corresponding concurrency types.
2635
On Apple platforms, set a deployment target
2736
of at least iOS 13, macOS 10.15, tvOS 13, or watchOS 6.
2837

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 6 can depend on
39+
a target that's written in Swift 5, Swift 4.2 or Swift 4,
3140
and vice versa.
3241
This means, if you have a large project
3342
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
3544
one framework at a time.
3645

3746
<!--

0 commit comments

Comments
 (0)