should we rename the Program grammar production?

Russ Thomas russgthomas at gmail.com
Fri Oct 12 08:36:26 PDT 2012


list-noob here - I hope this gets threaded ok.

> One of the pieces of awkward ES specification terminology has been the use of the word "Program" as the name for a global top-level StatementList.

This, I think is what (the noun) "program" should be reserved for.

> A ES "Program" is commonly only a single fragment of what most of us commonly think of as a program.

And these sub-components are lesser nouns, "script" -s

> This terminology mismatch is going to get ever worse as we integrate modules.

All of which are "scripts" to become a part of the "global top-level
StatementList" <= Program.

Said another way, we don't directly write programs, we compose scripts
which are "marshalled"/assembled into the Program by the
runtime/compiler, which is, if I've understood Allen (heck, even
myself!) correctly, the opposite of what Allen is suggesting :

> I proposed that we replace "Program" in this context with "Script".  This is much less confusing and matches the most common manifestation of an ES Program as an HTML script block.

And of course, <script> is only *one* mechanism by which scripts are
placed in the Program/"global top-level StatementList" (modules, node
et al).

$0.02
Russ / @codacoder


More information about the es-discuss mailing list