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

Ron Pressler ron.pressler at oracle.com
Mon Apr 17 23:42:10 UTC 2023



> 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


More information about the amber-dev mailing list