New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)

Andrew Evers andrew.evers at gmail.com
Tue Apr 18 00:22:03 UTC 2023


> > I think it would behoove the group to find a way for import statements
to be allowed.
>
> Imports are allowed. Can you say which part of the JEP led you to believe
they aren’t? Maybe we need to clarify something.

The JEPs mention import four times. The first implies it might be possible,
the second in the current launch protocol, and the other two prefaced by
"excluding".

If there was an example that included an import statement, it would help a
lot.


On Mon, Apr 17, 2023 at 7:42 PM Ron Pressler <ron.pressler at oracle.com>
wrote:

>
>
> > On 17 Apr 2023, at 16:34, Andrew Evers <andrew.evers at gmail.com> wrote:
> >
> >
> > I would say that it retains the signature of main() exactly as it has
> been for 20+ years, and allows an additional stage of using imports prior
> to moving to the full class syntax. It's at most 13 bytes shorter, hardly
> noticeable.
>
> JEP 445 also support imports and also retains the signature of main. It
> just accepts a few more signatures, and also allows an instance main to
> process command-line arguments.
>
> >
> > I think it would behoove the group to find a way for import statements
> to be allowed.
>
> Imports are allowed. Can you say which part of the JEP led you to believe
> they aren’t? Maybe we need to clarify something.
>
> — Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230417/14340256/attachment.htm>


More information about the amber-dev mailing list