| | @@ -13,7 +13,7 @@ |
| 13 | 13 | This report defines the language. It is short on purpose. Whatever it |
| 14 | 14 | doesn't allow, raz doesn't have. |
| 15 | 15 | |
| 16 | | -This is version 2026-10.29 of the report; section 11 says where each |
| 16 | +This is version 2026-10.30 of the report; section 11 says where each |
| 17 | 17 | version's changes are told. 2026-10.11 and 2026-10.12 are a thaw the owner chose, |
| 18 | 18 | for a language anyone can build again. They break programs written |
| 19 | 19 | for 2026-10.10 and before: for 2026-10.9, say, the report of compiler |
| | @@ -32,7 +32,9 @@ |
| 32 | 32 | array a call returns lives to the end of its statement, and a slice of |
| 33 | 33 | it kept past that is undefined (sections 8 and 10). 2026-10.29 is a |
| 34 | 34 | sixth thaw: an array constant typed `[]T` takes its length from its |
| 35 | | -literal (section 4); it breaks no program. |
| 35 | +literal (section 4); it breaks no program. 2026-10.30 mends a defect: |
| 36 | +`[]` used as a slice is the empty slice, which may be returned |
| 37 | +(sections 6.5 and 7.3); it breaks no program. |
| 36 | 38 | |
| 37 | 39 | The language is frozen, softly, from this version on: it changes only |
| 38 | 40 | to mend a defect, and its library grows only by what breaks no program |
| | @@ -776,7 +778,9 @@ |
| 776 | 778 | A record literal names its fields, in any order, each at most once; the |
| 777 | 779 | fields it leaves out are zero, so `{}` is the record with every field |
| 778 | 780 | zero. An array literal used as a slice is a |
| 779 | | -hidden variable of the procedure, and lives as long as its call. |
| 781 | +hidden variable of the procedure, and lives as long as its call; |
| 782 | +the empty one, `[]`, is the empty slice, as a slice variable starts |
| 783 | +(section 4), and no variable at all. |
| 780 | 784 | |
| 781 | 785 | ``` |
| 782 | 786 | c := {ch: 'A', attr: 7}; |
| | @@ -1052,9 +1056,9 @@ |
| 1052 | 1056 | |
| 1053 | 1057 | A slice returned must not point into the procedure's own frame, which |
| 1054 | 1058 | is gone once it returns. It is an error to return, as a slice, a local |
| 1055 | | -array, a value parameter that is an array, an array literal, or an |
| 1056 | | -array a call returns, or a slice of one, a field or an element of one |
| 1057 | | -included: |
| 1059 | +array, a value parameter that is an array, an array literal other than |
| 1060 | +`[]`, or an array a call returns, or a slice of one, a field or an |
| 1061 | +element of one included: |
| 1058 | 1062 | |
| 1059 | 1063 | ``` |
| 1060 | 1064 | proc short(h: Hex): []U8; (* Hex = [64]U8 *) |