<div dir="ltr"><div dir="ltr">On Thu, May 30, 2024 at 5:55 PM Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com">maurizio.cimadamore@oracle.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
  <div>That said, I'm not sure how common of a pattern this really is.
      All the examples I've seen so far have a certain artificial vibe
      to them. The kind of stuff compiler writers like us might want to
      write in a test :-)
    <p>It would be helpful I think to run some analysis and get some
      numbers. I'll see if I can do that, I think I know where to look.</p></div></blockquote><div>I'm definitely interested in what you find.<br></div></div><div><br></div><div>This is purely anecdotal, but in my experience *some* developers seem to be very fond of nested classes (where "fond of" might be a euphemism here).<br></div><div><br></div><div>And of course those developers expect to be able to reference all of their "outer stuff" from wherever. They treat "cannot reference x before superclass constructor" errors as an annoying irritation to be worked around if possible. Hopefully JEP 482 will make some of their various gymnastics less necessary, not more.<br></div><div><br></div><div>So I guess I'm saying nested classes in an early construction context that reference "outer stuff" may not be the most elegant way to code a solution in many cases, but I've seen it done that way. Of course in any case real data would be more enlightening.<br></div><br><div>-Archie<br></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>