Skip to content

Commit a4a1e1a

Browse files
committed
Update README, process, and proposal template for Swift 4 stage 1.
1 parent e14a99f commit a4a1e1a

File tree

3 files changed

+124
-36
lines changed

3 files changed

+124
-36
lines changed

0000-template.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,53 @@ comments detailing what it does. The detail in this section should be
4444
sufficient for someone who is *not* one of the authors to be able to
4545
reasonably implement the feature.
4646

47-
## Impact on existing code
48-
49-
Describe the impact that this change will have on existing code. Will some
50-
Swift applications stop compiling due to this change? Will applications still
51-
compile but produce different behavior than they used to? Is it
52-
possible to migrate existing Swift code to use a new feature or API
53-
automatically?
47+
## Source compatibility
48+
49+
Relative to the Swift 3 evolution process, the source compatibility
50+
requirements for Swift 4 are *much* more stringent: we should only
51+
break source compatibility if the Swift 3 constructs were actively
52+
harmful in some way.
53+
54+
Will existing correct Swift 3 or Swift 4 applications stop compiling
55+
due to this change? Will applications still compile but produce
56+
different behavior than they used to? If "yes" to either of these, is
57+
it possible for the Swift 4 compiler to accept the old syntax in it's
58+
Swift 3 compatibility mode? Is it possible to automatically migrate
59+
from the old syntax to the new syntax? Can Swift applications be
60+
written in a common subset that works both with Swift 3 and Swift 4 to
61+
aid in migration?
62+
63+
## Effect on ABI stability
64+
65+
Does the proposal change the ABI of existing language features? The
66+
ABI comprises all aspects of the code generation model and interaction
67+
with the Swift runtime, including such things as calling conventions,
68+
the layout of data types, and the behavior of dynamic features in the
69+
language (reflection, dynamic dispatch, dynamic casting via `as?`,
70+
etc.). Purely syntactic changes rarely affect existing ABI. Additive
71+
features may extend the ABI but, unless they extend some fundamental
72+
runtime behavior (such as the aforementioned dynamic features), they
73+
won't change the existing ABI.
74+
75+
Features that don't change the existing ABI are considered out of
76+
scope for [Swift 4 stage 1](README.md). However, additive features
77+
that would reshape the standard library in a way that changes its ABI,
78+
such as [where clauses for associated
79+
types](https://github.com/apple/swift-evolution/blob/master/proposals/0142-associated-types-constraints.md),
80+
can be in scope. If this proposal could be used to improve the
81+
standard library in ways that would affect its ABI, describe them
82+
here.
83+
84+
## Effect on API resilience
85+
86+
API resilience describes the changes one can make to a public API
87+
without breaking its ABI. Does this proposal introduce features that
88+
would become part of a public API? If so, what kinds of changes can be
89+
made without breaking ABI? Can this feature be added/removed without
90+
breaking ABI? For more information about the resilience model, see the
91+
[library evolution
92+
document](https://github.com/apple/swift/blob/master/docs/LibraryEvolution.rst)
93+
in the Swift repository.
5494

5595
## Alternatives considered
5696

README.md

Lines changed: 71 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,75 @@ historical purposes, but are not necessarily indicative of the
2020
features shipped. The release notes for each shipped version are the
2121
definitive list of notable changes in each release.
2222

23-
## Development major version: Swift 3.0
24-
25-
Expected release date: Late 2016
26-
27-
The primary goal of this release is to solidify and mature the Swift language and
28-
development experience. While source breaking changes to the language have been
29-
the norm for Swift 1 through 3, we would like the Swift 3.x (and Swift 4+)
30-
languages to be as *source compatible* with Swift 3.0 as reasonably possible.
31-
However, this will still be best-effort: if there is a really good reason to
32-
make a breaking change beyond Swift 3, we will consider it and find the least
33-
invasive way to roll out that change (e.g. by having a long deprecation cycle).
34-
35-
To achieve this end, Swift 3 focuses on getting the basics right for the
36-
long term:
23+
## Development major version: Swift 4.0
24+
25+
Expected release date: Late 2017
26+
27+
The Swift 4 release is designed around two primary goals: to provide
28+
source stability for Swift 3 code and to provide ABI stability for the
29+
Swift standard library. To that end, the Swift 4 release will be
30+
divided into two stages.
31+
32+
Stage 1 focuses on the essentials required for source and ABI
33+
stability. Features that don't fundamentally change the ABI of
34+
existing language features or imply and ABI-breaking change to the
35+
standard library will not be considered in this stage.
36+
37+
Stage 2 will commence once the implementation work on the Stage 1 features is cresting, and can contain a few other large and small features. The
38+
39+
The high-priority features supporting stage 1's source and ABI
40+
stability goals are:
41+
42+
* Source stability features: the Swift language will need [some
43+
accommodations](https://github.com/apple/swift-evolution/blob/master/proposals/0141-available-by-swift-version.md)
44+
to support code bases that target different language versions, to
45+
help Swift deliver on its source-compatibility goals while still
46+
enabling rapid progress.
47+
48+
* Resilience: resilience provides a way for public APIs to evolve over
49+
time, while maintaining a stable ABI. For example, resilience
50+
eliminates the [fragile base class
51+
problem](https://en.wikipedia.org/wiki/Fragile_base_class) that
52+
occurs in some object-oriented languages (e.g., C++) by describing
53+
the types of API changes that can be made without breaking ABI
54+
(e.g., "a new stored property or method can be added to a class").
55+
56+
* Stabilizing the ABI: There are a ton of small details that need to
57+
be audited and improved in the code generation model, including
58+
interaction with the Swift runtime. While not specifically
59+
user-facing, the decisions here affect performance and (in some rare
60+
cases) the future evolution of Swift.
61+
62+
* Generics improvements needed by the standard library: the standard
63+
library has a number of workarounds for language deficiencies, many
64+
of which manifest as extraneous underscored protocols and
65+
workarounds. If the underlying language deficiencies remain, they
66+
become a permanent part of the stable ABI. [Conditional
67+
conformances](https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md),
68+
[recursive protocol
69+
requirements](https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#recursive-protocol-constraints-),
70+
and [where clauses for associated
71+
types](https://github.com/apple/swift-evolution/blob/master/proposals/0142-associated-types-constraints.md)
72+
are known to be in this category, but it's plausible that other
73+
features will be in scope if they would be used in the standard
74+
library.
75+
76+
* String re-evaluation: String is one of the most important
77+
fundamental types in the language. Swift 4 seeks to make strings more
78+
powerful and easier-to-use, while retaining Unicode correctness by
79+
default.
80+
81+
* Memory ownership model: an (opt-in) Cyclone/Rust-inspired memory
82+
ownership model is highly desired by systems programmers and for
83+
other high-performance applications that want predictible and
84+
deterministic performance. This feature will fundamentally shape the
85+
ABI, from low-level language concerns such as "inout" and low-level
86+
"addressors" to its impact on the standard library.
87+
88+
## Swift 3.0 - Released on September 13, 2016
89+
90+
Swift 3 focused on solidifying and maturing the Swift language and
91+
development experience. It focused on several areas:
3792

3893
* **API design guidelines**: The way in which Swift is used in popular
3994
libraries has almost as much of an effect on the character of Swift
@@ -73,22 +128,10 @@ long term:
73128
overall goal of making Swift a simpler, more predictable, and more consistent
74129
language over the long term.
75130

76-
* **Improvements to tooling quality**: The overall quality of the compiler is
77-
really important to us: it directly affects the joy of developing in Swift.
78-
Swift 3 focuses on fixing bugs in the compiler and IDE features, improving the
79-
speed of compile times and incremental builds, improving the performance of
80-
the generated code, improving the precision of error and warning messages, etc.
81-
82-
One of the reasons that stability is important is that **portability** to non-Apple
83-
systems is also a strong goal of Swift 3. This release enables
131+
Swift 3 is the first release to enable
84132
broad scale adoption across multiple platforms, including significant
85133
functionality in the [Swift core libraries](https://swift.org/core-libraries/)
86-
(Foundation, libdispatch, XCTest, etc). A useful Linux/x86 port is
87-
already available (enabling many interesting server-side scenarios), and work is
88-
underway across the community to bring Swift to FreeBSD, Raspberry Pi, Android,
89-
Windows, and others. While we don't know which platforms will reach a useful
90-
state by the launch of Swift 3, significant effort continues to go into making
91-
the compiler and runtime as portable as practically possible.
134+
(Foundation, libdispatch, XCTest, etc), portability to a number of platforms including Linux/x86, Raspberry Pi, and Android, and the [Swift package manager](https://swift.org/package-manager/) to easily manage the distribution of Swift soure code.
92135

93136
Finally, Swift 3 also includes a mix of relatively small but important additions
94137
to the language and standard library that make solving common problems easier and

process.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ Please state explicitly whether you believe that the proposal should be accepted
4545
## How to propose a change
4646

4747
* **Check prior proposals**: many ideas come up frequently, and may either be in active discussion on the mailing list, or may have been discussed already and have joined the [Commonly Rejected Proposals](commonly_proposed.md) list. Please check the mailing list archives and this list for context before proposing something new.
48-
48+
* **Consider the goals of the upcoming Swift release**: Each major
49+
Swift release is focused on a [specific set of goals](README.md)
50+
described early in the release cycle. When proposing a change to
51+
Swift, please consider how your proposal fits in with the larger goals
52+
of the upcoming Swift release. Proposals that are clearly out of scope
53+
for the upcoming Swift release will not be brought up for review. If you can't resist discussing a proposal that you know is out of scope, please include the tag `[Out of scope]` in the subject.
4954
* **Socialize the idea**: propose a rough sketch of the idea on the [swift-evolution mailing list][swift-evolution-mailing-list], the problems it solves, what the solution looks like, etc., to gauge interest from the community.
5055
* **Develop the proposal**: expand the rough sketch into a complete proposal, using the [proposal template](0000-template.md), and continue to refine the proposal on the evolution mailing list. Prototyping an implementation and its uses along with the proposal is encouraged, because it helps ensure both technical feasibility of the proposal as well as validating that the proposal solves the problems it is meant to solve.
5156
* **Request a review**: initiate a pull request to the [swift-evolution repository][swift-evolution-repo] to indicate to the core team that you would like the proposal to be reviewed. When the proposal is sufficiently detailed and clear, and addresses feedback from earlier discussions of the idea, the pull request will be accepted. The proposal will be assigned a proposal number as well as a core team member to manage the review.

0 commit comments

Comments
 (0)