<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <br>
    <br>
    <blockquote type="cite" cite="mid:cbef21b3-6d05-7b7a-b788-c07d372b2b6b@oracle.com"><font size="4"><font face="monospace"> Coupling: unnamed classes must
          live in the unnamed package.  <br>
        </font></font></blockquote>
    <br>
    <font size="4"><font face="monospace">The rationale for this is that
        the only thing you can do with an unnamed class is run it from
        the command line, and it may well be the only class in your
        program.  If you're going to the effort of organizing into
        packages and distributing a JAR, you're well outside the use
        case for an unnamed class.  <br>
        <br>
        Another way to phrase this coupling is: distribution ->
        requires named classes.<br>
        <br>
      </font></font>
    <blockquote type="cite" cite="mid:cbef21b3-6d05-7b7a-b788-c07d372b2b6b@oracle.com"><font size="4"><font face="monospace"> Coupling: public is only
          optional on main methods in the unnamed package.<br>
        </font></font></blockquote>
    <br>
    <font size="4"><font face="monospace">This is largely a forced move,
        because giving the launcher additional privileges to open
        classes in existing packages would allow running of "main"
        methods that are not allowed today, which seems a compromise to
        the accessibility model.  Situating the launcher in the unnamed
        package seems an entirely unsurprising thing, and again, people
        don't (or shouldn't) distribute code in the unnamed package.  <br>
        <br>
        Another way to phrase this coupling is: distribution ->
        requires public entry points.  <br>
      </font></font><br>
    <blockquote type="cite" cite="mid:cbef21b3-6d05-7b7a-b788-c07d372b2b6b@oracle.com"><font size="4"><font face="monospace"> Coupling: instance main
          requires a no-arg constructor.<br>
        </font></font></blockquote>
    <br>
    <font size="4"><font face="monospace">Pretty hard to imagine getting
        around this one; seems intrinsic to the "instance main" feature.<br>
        <br>
      </font></font>
    <blockquote type="cite" cite="mid:cbef21b3-6d05-7b7a-b788-c07d372b2b6b@oracle.com"><font size="4"><font face="monospace"> Coupling: unnamed classes don't
          get constructors.<br>
        </font></font></blockquote>
    <br>
    <font size="4"><font face="monospace">This one could be decoupled,
        though I'm not sure it helps.  <br>
        <br>
      </font></font>
    <blockquote type="cite" cite="mid:cbef21b3-6d05-7b7a-b788-c07d372b2b6b@oracle.com"><font size="4"><font face="monospace"> Coupling: unnamed classes must
          have a main.<br>
        </font></font></blockquote>
    <br>
    <font size="4"><font face="monospace">If we interpret unnamed as
        really unnamed, the only thing you can do with an unnamed class
        is run it via the launcher, so not having a main would be
        silly.  <br>
        <br>
      </font></font><br>
  </body>
</html>