You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Branches.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Note that these branches come not from the "development" branches (above), but t
33
33
| ----------- | -----------------
34
34
| next | swift/next
35
35
36
-
`swift/next` is a branch for LLVM that includes all changes necessary to support Swift. Changes from llvm.org's master branch are automatically merged in. Why isn't this just `swift/main`? Well, because LLVM changes *very* rapidly, and that wouldn't be very stable. However, we do want to make sure the Swift stuff keeps working.
36
+
`swift/next` is a branch for LLVM that includes all changes necessary to support Swift. Changes from llvm.org's main branch are automatically merged in. Why isn't this just `swift/main`? Well, because LLVM changes *very* rapidly, and that wouldn't be very stable. However, we do want to make sure the Swift stuff keeps working.
37
37
38
38
If you are making changes to LLVM to support Swift, you'll probably need to work on them in `swift/main` to test them against Swift itself, but they should be committed to `swift/next`, and cherry-picked to the current release branch (`swift/release/x.y`) if needed. Remember, the release branches are automerged into `swift/main` on a regular basis.
39
39
@@ -60,9 +60,9 @@ You can use any of the branch names as the argument to `--scheme`, such as `main
60
60
61
61
1) LLVM Project changes that don't depend on Swift
62
62
63
-
- New commits go to `master` in the upstream [llvm-project](https://github.com/llvm/llvm-project).
63
+
- New commits go to `main` in the upstream [llvm-project](https://github.com/llvm/llvm-project).
64
64
65
-
- Then cherry-pick these commits to an appropriate, `swift/main` aligned `apple/stable/*` branch in Apple's fork of [llvm-project](https://github.com/apple/llvm-project). Please see [Apple's branching scheme](https://github.com/apple/llvm-project/blob/apple/master/apple-docs/AppleBranchingScheme.md) document to determine which `apple/stable/*` branch you should cherry-pick to.
65
+
- Then cherry-pick these commits to an appropriate, `swift/main` aligned `apple/stable/*` branch in Apple's fork of [llvm-project](https://github.com/apple/llvm-project). Please see [Apple's branching scheme](https://github.com/apple/llvm-project/blob/apple/main/apple-docs/AppleBranchingScheme.md) document to determine which `apple/stable/*` branch you should cherry-pick to.
66
66
67
67
Note that **no new changes should be submitted directly to `apple/main`**. We are actively working on eliminating the differences from upstream LLVM.
68
68
@@ -84,5 +84,5 @@ Some branches are *automerged* into other branches, to keep them in sync. This i
84
84
85
85
### LLVM Project
86
86
-`swift/release/x.y` (the *latest* release branch) is automerged into `swift/main`
87
-
- llvm.org's `master` is automerged into `swift/next`
87
+
- llvm.org's `main` is automerged into `swift/next`
88
88
- llvm.org's release branch *may* be automerged into `swift/release/x.y`, if they are in sync
Copy file name to clipboardExpand all lines: docs/GenericsManifesto.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ There are a number of restrictions to the use of generics that fall out of the i
27
27
28
28
### Recursive protocol constraints (*)
29
29
30
-
*This feature has been accepted in [SE-0157](https://github.com/apple/swift-evolution/blob/master/proposals/0157-recursive-protocol-constraints.md) and is tracked by [SR-1445](https://bugs.swift.org/browse/SR-1445).*
30
+
*This feature has been accepted in [SE-0157](https://github.com/apple/swift-evolution/blob/main/proposals/0157-recursive-protocol-constraints.md) and is tracked by [SR-1445](https://bugs.swift.org/browse/SR-1445).*
31
31
32
32
Currently, an associated type cannot be required to conform to its enclosing protocol (or any protocol that inherits that protocol). For example, in the standard library `SubSequence` type of a `Sequence` should itself be a `Sequence`:
33
33
@@ -77,7 +77,7 @@ There are a number of Swift declarations that currently cannot have generic para
77
77
78
78
### Generic typealiases
79
79
80
-
*This feature has been accepted in [SE-0048](https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md) and was released with Swift 3.*
80
+
*This feature has been accepted in [SE-0048](https://github.com/apple/swift-evolution/blob/main/proposals/0048-generic-typealias.md) and was released with Swift 3.*
81
81
82
82
Typealiases could be allowed to carry generic parameters. They would still be aliases (i.e., they would not introduce new types). For example:
83
83
@@ -114,7 +114,7 @@ Note: generic associatedtypes address many use cases also addressed by higher-ki
114
114
115
115
### Generic subscripts
116
116
117
-
*This feature has been accepted in [SE-0148](https://github.com/apple/swift-evolution/blob/master/proposals/0148-generic-subscripts.md), was tracked by [SR-115](https://bugs.swift.org/browse/SR-115) and was released with Swift 4.*
117
+
*This feature has been accepted in [SE-0148](https://github.com/apple/swift-evolution/blob/main/proposals/0148-generic-subscripts.md), was tracked by [SR-115](https://bugs.swift.org/browse/SR-115) and was released with Swift 4.*
118
118
119
119
Subscripts could be allowed to have generic parameters. For example, we could introduce a generic subscript on a `Collection` that allows us to pull out the values at an arbitrary set of indices:
120
120
@@ -210,7 +210,7 @@ There are a number of minor extensions we can make to the generics system that d
210
210
211
211
### Arbitrary requirements in protocols (*)
212
212
213
-
*This feature has been accepted in [SE-0142](https://github.com/apple/swift-evolution/blob/master/proposals/0142-associated-types-constraints.md) and was released with Swift 4.*
213
+
*This feature has been accepted in [SE-0142](https://github.com/apple/swift-evolution/blob/main/proposals/0142-associated-types-constraints.md) and was released with Swift 4.*
214
214
215
215
Currently, a new protocol can inherit from other protocols, introduce new associated types, and add new conformance constraints to associated types (by redeclaring an associated type from an inherited protocol). However, one cannot express more general constraints. Building on the example from "Recursive protocol constraints", we really want the element type of a `Sequence`'s `SubSequence` to be the same as the element type of the `Sequence`, e.g.,
216
216
@@ -226,7 +226,7 @@ Hanging the `where` clause off the associated type protocol is not ideal, but th
226
226
227
227
### Typealiases in protocols and protocol extensions (*)
228
228
229
-
*This feature has been accepted in [SE-0092](https://github.com/apple/swift-evolution/blob/master/proposals/0092-typealiases-in-protocols.md) and was released with Swift 3.*
229
+
*This feature has been accepted in [SE-0092](https://github.com/apple/swift-evolution/blob/main/proposals/0092-typealiases-in-protocols.md) and was released with Swift 3.*
230
230
231
231
Now that associated types have their own keyword (thanks!), it's reasonable to bring back `typealias`. Again with the `Sequence` protocol:
232
232
@@ -253,7 +253,7 @@ var p3: Promise = getRandomPromise() // p3 has type Promise<Int, Error> due to t
253
253
254
254
### Generalized `class` constraints
255
255
256
-
*This feature is a consequence of proposal [SE-0156](https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md) and was released with Swift 4.*
256
+
*This feature is a consequence of proposal [SE-0156](https://github.com/apple/swift-evolution/blob/main/proposals/0156-subclass-existentials.md) and was released with Swift 4.*
257
257
258
258
The `class` constraint can currently only be used for defining protocols. We could generalize it to associated type and type parameter declarations, e.g.,
259
259
@@ -322,7 +322,7 @@ Unlike the minor extensions, major extensions to the generics model provide more
322
322
323
323
### Conditional conformances (*)
324
324
325
-
*This feature has been accepted in [SE-0143](https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md) and is implemented in Swift 4.2.*
325
+
*This feature has been accepted in [SE-0143](https://github.com/apple/swift-evolution/blob/main/proposals/0143-conditional-conformances.md) and is implemented in Swift 4.2.*
326
326
327
327
Conditional conformances express the notion that a generic type will conform to a particular protocol only under certain circumstances. For example, `Array` is `Equatable` only when its elements are `Equatable`:
328
328
@@ -496,7 +496,7 @@ extension Bag {
496
496
497
497
### Moving the `where` clause outside of the angle brackets (*)
498
498
499
-
*Accepted in [SE-0081](https://github.com/apple/swift-evolution/blob/master/proposals/0081-move-where-expression.md) and implemented in Swift 3.*
499
+
*Accepted in [SE-0081](https://github.com/apple/swift-evolution/blob/main/proposals/0081-move-where-expression.md) and implemented in Swift 3.*
500
500
501
501
The `where` clause of generic functions comes very early in the declaration, although it is generally of much less concern to the client than the function parameters and result type that follow it. This is one of the things that contributes to "angle bracket blindness". For example, consider the `containsAll` signature above:
*Accepted in [SE-0095](https://github.com/apple/swift-evolution/blob/master/proposals/0095-any-as-existential.md) as "Replace `protocol<P1,P2>` syntax with `P1 & P2` syntax" and implemented in Swift 3.*
516
+
*Accepted in [SE-0095](https://github.com/apple/swift-evolution/blob/main/proposals/0095-any-as-existential.md) as "Replace `protocol<P1,P2>` syntax with `P1 & P2` syntax" and implemented in Swift 3.*
517
517
518
518
The `protocol<...>` syntax is a bit of an oddity in Swift. It is used to compose protocols together, mostly to create values of existential type, e.g.,
519
519
@@ -730,7 +730,7 @@ The generics system doesn't seem like a good candidate for a reduction in scope;
730
730
731
731
### Associated type inference
732
732
733
-
*[SE-0108](https://github.com/apple/swift-evolution/blob/master/proposals/0108-remove-assoctype-inference.md), a proposal to remove this feature, was rejected.*
733
+
*[SE-0108](https://github.com/apple/swift-evolution/blob/main/proposals/0108-remove-assoctype-inference.md), a proposal to remove this feature, was rejected.*
734
734
735
735
Associated type inference is the process by which we infer the type bindings for associated types from other requirements. For example:
Copy file name to clipboardExpand all lines: docs/LibraryEvolutionManifesto.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ Both of these annotations are things the compiler already knows when a type is d
122
122
123
123
The compiler actually has basic support for frozen classes, which allow stored properties to be accessed directly by offset from the class reference. There's no real reason why this can't be supported more generally, but confusion around *what's* being frozen and the rarity of wanting to make this promise anyway kept it out of [SE-0260][].
0 commit comments