<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 30/05/2024 23:24, Archie Cobbs
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CANSoFxuSoK1Nqm7nB11Z1mZsYUjuCfFLPpxJb_YeUBVXX-cW8g@mail.gmail.com">
<div>Remember pre-construction context includes superclass
constructor parameters, and developers are already commonly
referring to 2nd enclosing instances in code looking like this
example:<br>
</div>
<div><span style="font-family:monospace"><br>
</span></div>
<div style="margin-left:40px"><span style="font-family:monospace">class
Outer {<br>
String getName() {<br>
return "fred";<br>
}<br>
class Inner extends Thread {<br>
Inner() {<br>
super(new Runnable() {<br>
@Override<br>
public void run() {<br>
System.out.println("hello from " +
Outer.this.getName());<br>
}<br>
});<br>
}<br>
}<br>
}</span></div>
</blockquote>
<p>Sure, I know that super constructor arguments are part of the
issue (in fact that's the angle I was looking this problem at
before I realized it also impacted JEP 482).</p>
<p>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>
<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>
<p>Maurizio<br>
</p>
</body>
</html>