What is a language construct? (was Re: Comment on state of Project Jigsaw)

Neal Gafter neal at gafter.com
Wed Dec 21 15:50:21 PST 2011


I know how to put package (and import) declarations in a Java source file
such that they apply to types declared in that source file.

There does not appear to be a way to put a module declaration in a Java
source file such that the module declaration applies to types declared in
that source file.

Module declarations are therefore very much less intermixed than package,
import, and type declarations.

On Wed, Dec 21, 2011 at 2:30 PM, <mark.reinhold at oracle.com> wrote:

> 2011/12/21 14:15 -0800, neal at gafter.com:
> > A language construct is a syntactic construct that appears within source
> files
> > of the programming language.
> >
> > In this case (if I understand it) the language "addition" is distinct
> from and
> > never intermixed with syntax of the underlying programming language.  It
> is
> > therefore a distinct language.
>
> In purely syntactic terms module declarations are no less intermixed than
> package, import, or type declarations [1], and I don't think anyone would
> argue that those are not part of the language.
>
> - Mark
>
>
> [1] http://openjdk.java.net/projects/jigsaw/doc/lang-vm.html#jigsaw-1.3.2
>



More information about the jigsaw-dev mailing list