<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Tesla Ice Zhang" <ice1000kotlin@foxmail.com><br><b>To: </b>"Glavo" <zjx001202@gmail.com>, "amber-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Monday, April 10, 2023 11:47:23 PM<br><b>Subject: </b>Re:Fwd: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div>> not to allow instance methods to be main methods, and implicitly treat top-level variable and method declarations as static and public -- just like interfaces do. </div><br><div>Strongly agree.</div><br><div>Best regards,</div><div>Tesla</div></blockquote><div><br></div><div>Sadly, it's not how interfaces work.<br data-mce-bogus="1"></div><div>Interface does not make method declarations implicitly static, only field declarations are implicitly static.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div style="position: relative;"><br><br><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From:</b>                                                                                                                        "Glavo"                                                                                    <zjx001202@gmail.com>;</div><div><b>Date:</b> Tue, Apr 11, 2023 02:34 AM</div><div><b>To:</b> "amber-dev"<amber-dev@openjdk.org>;</div><div><b>Subject:</b> Fwd: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)</div></div><br><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Glavo</strong> <span dir="auto"><<a href="mailto:zjx001202@gmail.com" target="_blank">zjx001202@gmail.com</a>></span><br>Date: Tue, Apr 11, 2023 at 2:25 AM<br>Subject: Re: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)<br>To: <a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a> <<a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a>><br>Cc: Ron Pressler <<a href="mailto:ron.pressler@oracle.com" target="_blank">ron.pressler@oracle.com</a>>, <a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a> <<a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a>>, <a href="mailto:jdk-dev@openjdk.org" target="_blank">jdk-dev@openjdk.org</a> <<a href="mailto:jdk-dev@openjdk.org" target="_blank">jdk-dev@openjdk.org</a>><br></div><br><br><div dir="ltr">I like some parts of this proposal, but I disagree with it. I think this proposal is too narrow and limits its usefulness.<br><div>Is the implicit public and static modifiers strange? The interface has worked this way for many years, why is it not acceptable here?<br></div><br><div>Personally, I'd prefer not to allow instance methods to be main methods, and implicitly treat top-level variable and method declarations as static and public -- just like interfaces do.<br></div><div>I think this could be a step towards package-level declarations, whereas the current proposal limits the direction it can go.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 11, 2023 at 1:37 AM Mark Reinhold <<a href="mailto:mark.reinhold@oracle.com" target="_blank">mark.reinhold@oracle.com</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"><a href="https://openjdk.org/jeps/445" rel="noreferrer" target="_blank">https://openjdk.org/jeps/445</a><br>
<br>
  Summary: Evolve the Java language so that students can write their<br>
  first programs without needing to understand language features designed<br>
  for large programs. Far from using a separate dialect of Java, students<br>
  can write streamlined declarations for single-class programs and then<br>
  seamlessly expand their programs to use more advanced features as their<br>
  skills grow. This is a preview language feature.<br>
<br>
- Mark</blockquote></div>
</div></div></div><br></blockquote></div></div></body></html>