<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>"Brian Goetz" <brian.goetz@oracle.com><br><b>To: </b>"Kevin Bourrillion" <kevinb@google.com><br><b>Cc: </b>"amber-spec-experts" <amber-spec-experts@openjdk.java.net><br><b>Sent: </b>Wednesday, September 28, 2022 10:10:02 PM<br><b>Subject: </b>Re: Paving the on-ramp</blockquote><div><br></div></div><div data-marker="__QUOTED_TEXT__"><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;"><br>
    <br>
    <blockquote cite="mid:CAGKkBkvNzrfBKiYpr+eGT2ruTb0c6=C7LX1jbQtWmWsanWFwPw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><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><font size="4"><font face="monospace">  - Make the
                  "args" parameter to `main` optional, by allowing the
                  `java` launcher to<br>
                     first look for a main method with the traditional
                  `main(String[])`<br>
                     signature, and then (if not found) for a main
                  method with no arguments.<br></font></font></div>
          </blockquote>
          <div><br>
          </div>
          <div>This seems to leave users vulnerable to some surprises,
            where the code they think is being called isn't. Why not
            make it a compile-time error to provide both forms?</div>
        </div>
      </div>
    </blockquote>
    <br>
    Currently, the treatment of methods called "main" is "and also"; it
    is a valid method, *and also* (if it has the right shape) can be
    used as a main entry point.  Making this an error would take some
    valid programs and make them invalid, which seems a shift in the
    interpretation of the magic name "main".  A warning is probably
    reasonable though.</blockquote><div><br></div><div>The other solution is to do something similar to the compact constructor of a record, a compact main that have a syntax which is not currently valid in Java.</div><div><br></div><div>RĂ©mi<br data-mce-bogus="1"></div><div><br></div></div></div></body></html>