Module Views
David Bosschaert
david.bosschaert at gmail.com
Thu Dec 15 05:08:57 PST 2011
On 14 December 2011 23:26, Alex Buckley <alex.buckley at oracle.com> wrote:
> The language and ClassFile spec for module declarations (inc. support for
> views) is available at:
>
> http://openjdk.java.net/projects/jigsaw/doc/lang-vm.html
>
> Alex
I still strongly believe that the it's not right to define module
metadata in Java source files and have it end up in compiled .class
files inside jars. I thought that this decision was going to be made
by the modularity JSR so I am worried that the changes like this start
appearing in the VM and language design itself without having
consulted the JSR about it.
The module metadata should be:
* extensible. So it can be used and extended by other module systems
(such as OSGi) to store additional metadata as well as by tools that
may need to store additional information alongside the module
definitions. To me the use of java source files and .class binary
files seem to give very little room for extensibility.
* easily readable by both machines and humans. Why tools and other
module systems bust be able to read them is obvious, but experience of
working with modules has shown that it can be invaluable for a person
to look at the module metadata, esp in troubleshooting situations.
.class files are not suitable for reading by humans and will be
awkward for tools and other module systems to read too.
To me it seems ilke the use of XML would be a good way to represent
module metadata. Its highly extensible (you can add custom-namespaced
tags anywhere), and quite readable but both humans and machines.
But instead of XML another textual format might also do, if properly designed.
Best regards,
David Bosschaert
More information about the jigsaw-dev
mailing list