<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <font size="4" face="monospace">Sure, there are other ways we could
      have designed the language.  Tuples are structural types, which
      means they are not declared, but instead spring when the type
      constructor is applied to other (necessarily accessible) types. 
      This means there is no need for access control, since anyone who
      can access T and U can "summon" the type `tuple<T,U>`.  (We
      have this for arrays already -- which is already a significant
      source of irregularity in the language, so we chose not to emulate
      that.)<br>
      <br>
      But, we chose to lean into Java's class-based, nominal type
      system.  Making special exceptions "because it's like a tuple" is
      surely convenience in some cases, but makes the language more
      complicated to reason about overall.  <br>
    </font><br>
    <br>
    <div class="moz-cite-prefix">On 12/8/2024 10:15 AM, Florian Weimer
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:87v7vufbog.fsf@mid.deneb.enyo.de">
      <pre class="moz-quote-pre" wrap="">It's the syntactic overhead.  The attractiveness of this pattern is
that's it's a clear and concise notation for this type of
deserialization.  Creating a public type for it in a suitable package
sort of breaks that.</pre>
    </blockquote>
    <br>
  </body>
</html>