gracelang / language

Design of the Grace language and its libraries
GNU General Public License v2.0
6 stars 1 forks source link

language spec incomplete: statements #120

Closed KimBruce closed 7 years ago

KimBruce commented 7 years ago

The language specification does not specify the statements in the language. In particular, there is nowhere in the spec that defines the syntax for while loops, the method part name "elseif" does not appear in the language spec, etc. The only way I could determine the language supported do{}while{} was to try it out.

Surely I'm missing something obvious, but it is not even in the grammar at the end of the language spec.

apblack commented 7 years ago

These thing should be in the specification of the standardGrace dialect.

It's a matter of packaging really: should the standard dialect be included in the language spec, or not. A purist would say not, but, since the spec needs examples, we can hardly avoid using the standardGrace dialect.

KimBruce commented 7 years ago

There should at least be a notation early in the spec mentioning the existence of the standard dialect (with a pointer to it) as well as a list of items in the standard dialect (not necessarily with explanation) in an appendix so the reader can make sense of the rest of the spec. Having the documents mutually recursive where not necessary is not a great benefit to the reader.

apblack commented 7 years ago

On 12 Dec 2016, at 17:41 , Kim Bruce notifications@github.com wrote:

There should at least be a notation early in the spec mentioning the existence of the standard dialect (with a pointer to it) as well as a list of items in the standard dialect (not necessarily with explanation) in an appendix so the reader can make sense of the rest of the spec. Having the documents mutually recursive where not necessary is not a great benefit to the reader.

I agree — the spec should say that most of the language is defined in the dialect. Who is going to add it?

Andrew
apblack commented 7 years ago

Kim has added a paragraph to the spec:

Many of the expressions and commands in Grace are actually defined in the Grace standard prelude (and hence may not be supported in all dialects).