@@ -24,13 +24,13 @@ Swift has a pretty small set of types right now:
24
24
* Fundamental types: currently i1, i8, i16, i32, and i64;
25
25
float and double; eventually maybe others.
26
26
* Function types.
27
- * Tuples. Heterogenous fixed-length products. Swift's system
27
+ * Tuples. Heterogeneous fixed-length products. Swift's system
28
28
provides two basic kinds of element: positional and labelled.
29
29
* Arrays. Homogenous fixed-length aggregates.
30
30
* Algebraic data types (ADTs), introduce by enum. Nominal closed
31
- disjoint unions of heterogenous types.
32
- * Struct types. Nominal heterogenous fixed-length products.
33
- * Class types. Nominal, subtypeable heterogenous fixed-length products
31
+ disjoint unions of heterogeneous types.
32
+ * Struct types. Nominal heterogeneous fixed-length products.
33
+ * Class types. Nominal, subtypeable heterogeneous fixed-length products
34
34
with identity.
35
35
* Protocol and protocol-composition types.
36
36
@@ -171,7 +171,7 @@ Default
171
171
.......
172
172
173
173
I keep going back and forth about having a "default" case-introducer.
174
- On the one hand, I kindof want to encourage total matches. On the
174
+ On the one hand, I kind of want to encourage total matches. On the
175
175
other hand, (1) having it is consistent with C, (2) it's not an
176
176
unnatural style, and (3) there are cases where exhaustive switching
177
177
isn't going to be possible. We can certainly recommend complete
@@ -274,7 +274,7 @@ fallthrough".
274
274
275
275
Chris seems motivated to eventually add an explicit 'fallthrough'
276
276
statement. If we did this, my preference would be to generalize it by
277
- allowing the match to be reperformed with a new value, e.g.
277
+ allowing the match to be performed again with a new value, e.g.
278
278
:code: `fallthrough(something) `, at least optionally. I think having
279
279
local functions removes a lot of the impetus, but not so much as to
280
280
render the feature worthless.
@@ -419,7 +419,7 @@ Assignment
419
419
..........
420
420
421
421
This is a bit iffy. It's a lot like var bindings, but it doesn't have a keyword,
422
- so it's really kindof ambiguous given the pattern grammar.
422
+ so it's really kind of ambiguous given the pattern grammar.
423
423
424
424
Also, l-value patterns are weird. I can come up with semantics for this, but I
425
425
don't know what the neighbors will think::
@@ -511,7 +511,7 @@ equal to this expression, but allow some holes and some more complex
511
511
'matcher' values". But it's possible that it instead might be really
512
512
badly confusing. We'll see! It'll be fun!
513
513
514
- This kindof forces us to have parallel pattern grammars for the two
514
+ This kind of forces us to have parallel pattern grammars for the two
515
515
major clients:
516
516
517
517
- Match patterns are used in :code: `switch ` and :code: `matches `, where
@@ -574,7 +574,7 @@ Annotation patterns
574
574
575
575
In an exhaustive pattern, you can annotate an arbitrary sub-pattern
576
576
with a type. This is useful in an exhaustive pattern: the type of a
577
- variable isn't always inferrable (or correctly inferrable ), and types
577
+ variable isn't always inferable (or correctly inferable ), and types
578
578
in function signatures are generally outright required. It's not as
579
579
useful in a match pattern, and the colon can be grammatically awkward
580
580
there, so we disallow it.
0 commit comments