<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Ok, I phrased it incorrectly. I see that technically it isn't static. My concern is that the "main" method is usually static (until now it is always that), but now you will be able to create a main method without the "static" keyword. So for a beginner, without understanding fully the difference between static and non-static (which isn't easy!) it seems that the main became implicitly static. At least it behaves very similarly, and it will work with or without the static keyword. So it can lead to confusion. The class instantiation is hidden, so syntactically it seems the main method became static automatically.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">That's why I was thinking of a drastically new entry point declaration, which can't be mixed up with the old static method. To avoid that order, the main method is looked up. In theory it could be named differently. Instead of "main" it could be called "start" for example. But I know we should be careful using new words. So I thought that using simply "main()" would be completely different to the current "public static void main()" solution. "If we have the former, the latter should be disallowed." So in practice it could be used as a simpler entry point. (With or without args.)<br><br></div><div class="gmail_default" style="font-size:small">Hunor</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 11 Apr 2023 at 21:37, Remi Forax <<a href="mailto:forax@univ-mlv.fr">forax@univ-mlv.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><br></div><div><br></div><hr id="m_9004612742826812044zwchr"><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Hunor Szegi" <<a href="mailto:hunor.szegi@gmail.com" target="_blank">hunor.szegi@gmail.com</a>><br><b>To: </b>"amber-dev" <<a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a>><br><b>Sent: </b>Tuesday, April 11, 2023 10:29:33 PM<br><b>Subject: </b>Re: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)<br></blockquote></div><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div style="font-size:small"><div>Hi All,</div><div><br></div><div>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."</div></div></div></blockquote><div><br></div><div>There is no implicit static.<br></div><div>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.<br></div><div><br></div><div>So I repeat, there is no implicit static.</div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div style="font-size:small"></div></div></blockquote><div>[...]<br></div><div><br></div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div style="font-size:small"><div><br></div><div>Thanks,</div><div>Hunor</div></div></div></blockquote><div><br></div><div>regards,<br></div><div>Rémi<br></div><div><br></div></div></div></div></blockquote></div></div>