@@ -90,24 +90,31 @@ in this section.
90
90
91
91
Because Swift has a stable ABI on some platforms, proposals are
92
92
generally not acceptable if they would require changes to the ABI
93
- of existing language features or declarations. For example,
94
- Swift could not accept a feature which, in order to work, would
95
- require parameters with certain types to always be passed as owned
96
- values, because parameters are not always passed as owned values
97
- in the ABI. Proposals must be designed to avoid the need for this.
98
- For example, the feature above might only be enabled for parameters
99
- marked a special way, and then adding that marking to an existing
100
- function parameter would change the ABI of that function.
101
-
102
- Proposals may be acceptable if they can be thought of as merely
103
- * adding* to the ABI, such as by adding new kinds of declarations,
104
- adding new modifiers or attributes, or adding new types or methods
105
- to the Swift standard library. On platforms with stable ABIs, such
106
- features will by default require a new release of the platform in
107
- order to work, and so their use in code that may deploy to older
108
- releases will have to be availability-guarded. If this limitation
109
- applies to any part of this proposal, that should be discussed
110
- in this section.
93
+ of existing language features or declarations. Proposals must be
94
+ designed to avoid the need for this.
95
+
96
+ For example, Swift could not accept a proposal for a feature which,
97
+ in order to work, would require parameters of certain (existing)
98
+ types to always be passed as owned values, because parameters are
99
+ not always passed as owned values in the ABI. This feature could
100
+ be fixed by only enabling it for parameters marked a special new way.
101
+ Adding that marking to an existing function parameter would change
102
+ the ABI of that specific function, which programmers can make good,
103
+ context-aware decisions about: adding the marking to an existing
104
+ function with a stable ABI would not be acceptable, but adding it
105
+ to a new function or to a function with no stable ABI restrictions
106
+ would be fine.
107
+
108
+ Proposals that change the ABI may be acceptable if they can be thought
109
+ of as merely * adding* to the ABI, such as by adding new kinds of
110
+ declarations, adding new modifiers or attributes, or adding new types
111
+ or methods to the Swift standard library. The key principle is
112
+ that the ABI must not change for code that does not use the new
113
+ feature. On platforms with stable ABIs, uses of such features will
114
+ by default require a new release of the platform in order to work,
115
+ and so their use in code that may deploy to older releases will have
116
+ to be availability-guarded. If this limitation applies to any part
117
+ of this proposal, that should be discussed in this section.
111
118
112
119
Adding a function to the standard library does not always require
113
120
an addition to the ABI if it can be implemented using existing
0 commit comments