Module compilation unit grammar
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri Mar 25 11:44:09 PDT 2011
On 03/18/2011 11:33 AM, Alex Buckley wrote:
> On 3/18/2011 9:23 AM, Alan Bateman wrote:
>>> ModuleRequire:
>>> 'require' [ModuleRequireModifier] ModuleName ['@' VersionQuery] ';'
>> Just going through your mail of 3/11. Should this be "requires" as I
>> think that is what javac looks for today? Same this with
>> ModuleProvide where I think it may be "provides".
>
> As the scope of the module system expands to include features like
> explicit exports of packages/classes, it becomes clear that the
> "directives" in the module compilation unit are really _statements_ of
> a Java-like language to configure observability (JLS 7.4.3).
>
> Syntax is as usual a matter of taste but we can look to statements in
> the Java language for guidance. We find 'import' not 'imports', and
> 'assert' not 'asserts'. So I now propose 'export' not 'exports', and
> 'require' not 'requires', etc.
>
> Alex
Statements are typically ordered. By drawing analogy with statements,
are you implying that the order of the items in a module compilation
unit is significant and should be preserved?
Is there a spec for the compiled representation of a ModuleExport statement?
-- Jon
More information about the jigsaw-dev
mailing list