What is a language construct? (was Re: Comment on state ofProject Jigsaw)
Stephen McConnell
mcconnell at dpml.net
Wed Jan 4 06:50:45 PST 2012
Woops - sorry, need clarification.
Are your suggesting that the language is frozen and cannot evolve?
/SJM
-----Original Message-----
From: David Bosschaert
Sent: Thursday, January 05, 2012 12:27 AM
To: jigsaw-dev at openjdk.java.net
Subject: Re: What is a language construct? (was Re: Comment on state
ofProject Jigsaw)
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