Skip to content

Commit a316a53

Browse files
committed
upd
1 parent ad66dfa commit a316a53

8 files changed

Lines changed: 11 additions & 10 deletions

File tree

notes/global-objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- [ ] DecimalContext
3131
- [ ] Supports "precision" and "rounding" options for now (look at decimal.js's API to get some ideas)
3232
- [ ] Iterator.\<T> (interface)
33-
- [ ] required `next() : [t]?` (the returned array must be of length 1)
33+
- [ ] required `next() : [t?,boolean]` (returns `[item, done]`)
3434
- [ ] `length():int` (consumes the whole iterator)
3535
- [ ] `skip(count:int):void`
3636
- [ ] `meta::filter(...)` (returns another iterator)

notes/semantics-and-verification.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@
121121
- [x] ShockScript: Type expressions
122122
- [ ] `map {}` and `tap {}` must not appear everywhere; they are only allowed as the right side of an alias `type` definition.
123123
- [x] ShockScript: Patterns
124-
- [ ] Structural matching automatically asserts objects as non-null not always necessarily throwing an error depending on pattern context (that way, the language doesn't need a "!" operator inside patterns)
125-
- [ ] This is also particularly useful for if let applied to iterator results (e.g. `if (let [ch] = characters.next()) { ... }`)
124+
- [ ] Structural matching automatically asserts objects as non-null not always necessarily throwing an error depending on pattern context. Although, the non-null operator is included within patterns as it's still useful for, say, identifier binding patterns.
126125
- [x] ShockScript: Statements
127126
- [ ] If statement
128127
- [ ] If let statement

src/conversions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Implicit coercions occur implicitly both at compile-time and runtime, after tryi
5252
| From union member to union | |
5353
| From union to a common base type | For example, given `type U = (B, C)`, a `var a:A = u;` declaration is valid as long as B and C share A as a base type. |
5454
| From structural function type to another compatible function type | |
55+
| From `t` type parameter to `t?` | |
5556

5657
> **Note**: `interface` types inherit `Object`.
5758

src/lang-patterns.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Where applicable, expressions are disambiguated into those patterns, in which ca
1212
[lookahead ≠ <b>undefined</b> if pattern is nested] <i>IdentifierPattern</i><br>
1313
<i>ArrayPattern</i><br>
1414
<i>ObjectPattern</i><br>
15-
<i>ConstantPattern</i> [if pattern is nested]
15+
<i>ConstantPattern</i> [if pattern is nested]<br>
16+
<i>Pattern</i> <i>NonNull</i>
1617
</ul>
1718
</ul>
1819

src/lang-statements/if-let-statement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (let node = parseAtom()) {
1919
`if..let` can also be useful for, say, iterator results.
2020

2121
```sx
22-
if (let [x] = characters.next()) {
22+
if (let [x!,false] = characters.next()) {
2323
//
2424
} else {
2525
break;

src/types/record.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Record types **\{\}** are simple property records.
44

55
Specifically, there are variations of the record type, which are each represented and used in a different way.
66

7-
**map \{\}** types are like a hash-map internally, using boxing for primitive types. Fields that are not specified are not inserted into the structure. **map \{\}** **MUST NOT** appear anywhere but at the right side of an alias `type` definition.
7+
**map \{\}** types are like a hash-map internally, using boxing for primitive types. Fields that are not specified are not inserted into the structure.
88

99
```sx
1010
type Options = map {
@@ -13,7 +13,7 @@ type Options = map {
1313
};
1414
```
1515

16-
**tap \{\}** types are similar to **map \{\}**, but their creation and field accessors are implementation-defined, and they desugar to classes. **tap \{\}** **MUST NOT** appear anywhere but at the right side of an alias `type` definition.
16+
**tap \{\}** types are similar to **map \{\}**, but their creation and field accessors are implementation-defined, and they desugar to classes.
1717

1818
Although **map \{\}** and **tap \{\}** types appear as type expressions, they are unique; structurally-matching records cannot be assigned to the other, or vice versa.
1919

src/types/tuple.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Tuple types
22

3-
Tuple types, of the form `[T1, T2, ...TN]`, are immutable sequences consisting of known element types at compile time. A tuple type contains at least two elements.
3+
Tuple types, of the form `[t1,t2,tN]`, are immutable sequences consisting of known element types at compile time. A tuple type contains at least two elements.
44

55
```sx
6-
[boolean, float]
6+
[boolean,float]
77
```

src/types/union.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Union types
22

3-
The structural union type, written `(t1, t2, tN)`, consists of two or more member types, containing all possible values of the member types.
3+
The structural union type, written `(t1,t2,tN)`, consists of two or more member types, containing all possible values of the member types.
44

55
```sx
66
(decimal,string)

0 commit comments

Comments
 (0)