| | @@ -850,7 +850,8 @@ |
| 850 | 850 | result and drops the second. What is dropped is still evaluated as |
| 851 | 851 | any expression is: its calls are made, and a volatile variable in it |
| 852 | 852 | is read (section 7.6). A result dropped by a call standing on its own |
| 853 | | -is warned of (section 10); one dropped through `_` isn't. |
| 853 | +is a lint an implementation may warn of (section 10); one dropped |
| 854 | +through `_` says it is meant. |
| 854 | 855 | |
| 855 | 856 | ### 7.2 Conditions and loops |
| 856 | 857 | |
| | @@ -1071,7 +1072,7 @@ |
| 1071 | 1072 | as `c` itself would, with a target for each: `a, b := try f(x);`. |
| 1072 | 1073 | |
| 1073 | 1074 | As a statement, `try c;` drops the values of `c` that it has, and a |
| 1074 | | -dropped value is warned of as a call that drops a result is (section |
| 1075 | +dropped value is a lint, as a call that drops a result is (section |
| 1075 | 1076 | 10); `_ := try c;` and `a, _ := try c;` say it is meant (section 7.1). |
| 1076 | 1077 | The error is never dropped: `try` is the way of passing it on. |
| 1077 | 1078 | |
| | @@ -1311,24 +1312,18 @@ |
| 1311 | 1312 | A); one that does makes the same program as if every module were |
| 1312 | 1313 | compiled together, and keeps one copy of each instance. |
| 1313 | 1314 | |
| 1314 | | -**Messages.** The compiler reports an error with its file, line and |
| 1315 | | -column, the line of source with the offending part underlined, and, |
| 1316 | | -where they help, notes pointing at other places, such as where a name |
| 1317 | | -is declared, and a suggestion, such as a name in reach spelled almost |
| 1318 | | -alike. It goes on after an error to find the others, up to 20, and |
| 1319 | | -writes no executable. After an error it skips the statement or |
| 1320 | | -declaration the error is in and carries on with the next; a name that |
| 1321 | | -isn't declared is reported once, and nothing that follows from it is |
| 1322 | | -reported. An error in the text itself, such as a string left open, |
| 1323 | | -stops the compile, and so does a module with errors, after it. |
| 1324 | | - |
| 1325 | | -The compiler also warns of what is declared and never used: an import; |
| 1326 | | -a constant, type, variable or procedure that isn't exported; a |
| 1327 | | -parameter of a procedure written in raz. It warns of a variable that is |
| 1328 | | -assigned but never read, too, and of a call standing on its own that |
| 1329 | | -drops a result, as `Sys.write(fd, s);` does: `_ := Sys.write(fd, s);` |
| 1330 | | -says it is meant. A name that starts with `_` is never warned about. |
| 1331 | | -Warnings don't stop the compile; `raz -Werror` makes them errors. |
| 1315 | +**Errors.** A program that breaks a rule of this report that says it |
| 1316 | +is an error isn't a raz program, and an implementation must reject it: |
| 1317 | +say what is wrong and make no executable. Such a rule is one whose |
| 1318 | +breach would leave the program with no meaning this report can give: a |
| 1319 | +mistake of types, a name that isn't declared or is declared twice, an |
| 1320 | +assignment to what is read-only, a module that imports itself. A fault |
| 1321 | +that is only a lint isn't an error: a name declared and never used, or |
| 1322 | +a result that a call standing on its own drops (`Sys.write(fd, s);`, |
| 1323 | +where `_ := Sys.write(fd, s);` says it is meant). A program with one is |
| 1324 | +valid, and an implementation may warn of it. The text of its messages, |
| 1325 | +how many it reports and which warnings it gives are its own (appendix |
| 1326 | +A). |
| 1332 | 1327 | |
| 1333 | 1328 | ## 11. The library |
| 1334 | 1329 | |
| | @@ -2037,7 +2032,7 @@ |
| 2037 | 2032 | - **2026-10.13.** `Sys` gains writing without waiting, and waiting for |
| 2038 | 2033 | room to write (section 11). |
| 2039 | 2034 | - **2026-10.14.** The blank, `_`, drops a value or one of several |
| 2040 | | - results (section 7.1); a call that drops a result is warned of |
| 2035 | + results (section 7.1); a call that drops a result is a lint |
| 2041 | 2036 | (section 10). |
| 2042 | 2037 | - **2026-10.15.** `Math` gains `pow`, `ceil`, `round`, `log2`, |
| 2043 | 2038 | `log10`, `tan`, `asin`, `acos` and `atan`; `Sys` gains `space` |
| | @@ -2105,11 +2100,12 @@ |
| 2105 | 2100 | compiled code; either way the program stops with its message |
| 2106 | 2101 | (section 10). |
| 2107 | 2102 | - **Messages and warnings.** The text of the compiler's messages, how |
| 2108 | | - many errors it reports before it stops, and which warnings it gives |
| 2109 | | - (section 10). A program that is an error in this report is one in |
| 2110 | | - every implementation; the words that say so are free. So is what a |
| 2111 | | - program that fails says on standard error: conformance is judged by a |
| 2112 | | - program's standard output and exit status, never by its standard error. |
| 2103 | + many errors it reports before it stops, and which warnings it gives, |
| 2104 | + `-Werror` included (section 10). That a program that is an error in |
| 2105 | + this report is rejected isn't free; the words that say so are. So is |
| 2106 | + what a program that fails says on standard error: conformance is |
| 2107 | + judged by a program's standard output and exit status, never by its |
| 2108 | + standard error. |
| 2113 | 2109 | - **The command line.** How the compiler is run, its options, and |
| 2114 | 2110 | where its library lives (sections 1 and 3). |
| 2115 | 2111 | |