ECMAScript Edition 5 introduced a backwards-compatible syntax of the directive prologue with string-literal-expression-statement directives for pragmas. With Harmony, we are allowing the introduction of new syntax via versioning, so we should move towards a future-proof pragma syntax.
This spec proposes the introduction of a keyword
use in place of the previous string-literal directives. In Harmony, the string literal form would no longer be recognized as special.
A hypothetical example is the old strawman lexical scope pragma:
use lexical scope;
While this spec does not propose any specific pragmas, its primary purpose is to create a syntactic space for future pragmas, i.e., for future-proofing.
The syntax of pragmas is designed to be very permissive, so that implementations may introduce custom pragmas.
UsePragma ::= "use" PragmaItem ("," PragmaItem)* ";" PragmaItem ::= PragmaWord+ PragmaWord ::= Keyword | Identifier