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

Remi Forax forax at univ-mlv.fr
Tue Apr 11 20:37:44 UTC 2023


> From: "Hunor Szegi" <hunor.szegi at gmail.com>
> To: "amber-dev" <amber-dev at openjdk.org>
> Sent: Tuesday, April 11, 2023 10:29:33 PM
> Subject: Re: New candidate JEP: 445: Flexible Main Methods and Anonymous Main
> Classes (Preview)

> Hi All,

> Thank you for this new proposal, I like the idea of JEP 445 with the flexible
> main methods. My only concern is the implicit "static" keyword. Which means the
> initially learned main method format should be modified later, so this doesn't
> really support the gradual learning curve. It is even a little bit against the
> goal "Do not introduce a separate beginner's dialect of Java."

There is no implicit static. 
It works the other way around, the launcher first checks for a static main and if none is found, it checks for a non static main and a default constructor. 

So I repeat, there is no implicit static. 

[...] 

> Thanks,
> Hunor

regards, 
Rémi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230411/1e0eef85/attachment.htm>


More information about the amber-dev mailing list