module name convention

forax at univ-mlv.fr forax at univ-mlv.fr
Wed Oct 14 13:53:31 UTC 2015


Just a quick note,
I've presented the Java module spec in its current state at JTRES (a realtime Java conf).

I've used the '_' notation which clearly make the things more readable,
I had no question related to the fact that people were troubled because 'requires' takes a module and 'exports' takes a package.

Rémi

----- Mail original -----
> De: "mark reinhold" <mark.reinhold at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: jpms-spec-experts at openjdk.java.net
> Envoyé: Lundi 5 Octobre 2015 20:48:23
> Objet: Re: module name convention
> 
> 2015/9/19 10:02 -0700, forax at univ-mlv.fr:
> > Mani from AdoptAJSR has a very good question at the end of this document:
> >   https://docs.google.com/document/d/1KlumN74IGt-TU-Md3Fn5h4sXHa75RApWNLszUTVp-DE/edit
> > 
> > ...
> > 
> > Both Eclipse and Maven use package name or at least package prefix as
> > convention to name module and as Mani said it really confusing when you
> > write a module-info file.
> > 
> > Given that the name of the JDK modules doesn't respect that convention
> > but still use '.' to separate the different components, I wonder if we
> > should not try to come with a convention for module name that allow to
> > easily disambiguate between package name and module name.
> 
> Yes, I think that's worth exploring.
> 
> > By example,
> >   java_base,
> >   java-base,
> >   java~base ...
> 
> Quick reactions:
> 
>   java_base is still a Java identifier, which is nice.
> 
>   java-base corresponds usefully to how JAR files are typically named
>   (e.g., java-base-1.2.3.jar).
> 
>   java~base is pretty ugly (especially with longer names, e.g.,
>   jdk~scripting~nashorn~shell).
> 
> I'm sure there are other possibilities ...
> 
> > Obviously the other solution is to prefix a name by "package" or
> > "module".
> 
> As in, `requires module com.foo` and `exports package com.foo`?
> 
> - Mark
> 


More information about the jpms-spec-experts mailing list