What is a language construct? (was Re: Comment on state of Project Jigsaw)
Rémi Forax
forax at univ-mlv.fr
Wed Jan 4 06:46:40 PST 2012
The module descriptor is not the .java but the .class,
the .java is a convenient way to specify the module descriptor.
This allow to have a readable syntax for the user and
a module descriptor that contains synthetized informations
by example the module descriptor can contain a set of exported types,
having a .java let users to use a * (wildcard) to specify the exported
types.
I expect all tools will use the jigsaw reflective API or ASM.
Rémi
On 01/04/2012 02:57 PM, David Bosschaert wrote:
> On 23 December 2011 01:05, Alex Buckley<alex.buckley at oracle.com> wrote:
>> Many presentations on Jigsaw have covered the need for modules to _look_
>> familiar to Java programmers, leading to the open requirement:
>>
>> "Java-like syntax — The syntax of module declarations must be similar to
>> that of declarations of a like nature in the Java programming language."
> I'd say these presentations represent only a limited section of the community.
> There have been many arguments made by a variety of people arguing for
> a DSL or other mechanism which is more suited for storing module
> declarations. This email trail is an example of that.
>
> Just to give one example where it doesn't fit:
> A module declaration applies to the artifact as a whole, i.e. the
> module jar file, so it doesn't fit naturally alongside other java
> classes in any java file - it needs to be in a special file of its
> own. And that special file will look different from all the other java
> files so hence it doesn't make sense to make it part of the java
> syntax as this syntax is only used in this special place, effectively
> creating a separate language, as Neal mentioned above.
> Making things worse, having it in a .java file implies that it will be
> compiled into a .class file which makes thing unnecessarily complex
> for tools and other module systems to read this thing at runtime.
> Additionally, having it in a .class file compromises the extensibility
> of the module metadata, which is needed for module systems that may
> have more features and need extensions to JSE module metadata.
>
>> From that open requirement flows a module declaration built from the
>> traditional input elements of the Java language, and included under
>> CompilationUnit in the Java grammar. Yes, the requirement is open, but it's
>> the current direction of the Jigsaw prototype.
> Its an open requirement clearly because opinions diverge over this
> issue. We need to stress that Jigsaw is a prototype and that this
> aspect of the prototype can't 'just make it' into JSE8 without proper
> discussion in the upcoming modularity JSR.
>
> Best regards,
>
> David
More information about the jigsaw-dev
mailing list