<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello,</div><div>i'm not sure it's wise to have flexible constructor bodies to be out of preview.</div><div><br data-mce-bogus="1"></div><div>There is a non trivial interaction with the introduction of strict fields and i am not sure those two should be separated, mostly because with strict fields, initializing a field before the call to super() change its semantics while with a flexible constructor body, one can already initialize the field before the call to super() without the semantics being changed.</div><div><br data-mce-bogus="1"></div><div>But i'm sure i'm missing something ...</div><div><br data-mce-bogus="1"></div><div>regards,</div><div>RĂ©mi</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>"Gavin Bierman" <gavin.bierman@oracle.com><br><b>To: </b>"amber-spec-experts" <amber-spec-experts@openjdk.org><br><b>Sent: </b>Tuesday, April 22, 2025 3:48:31 PM<br><b>Subject: </b>Draft Spec for Flexible Constructor Bodies (JEP 513)<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><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;">
<div>Dear experts,</div>
<div><br>
</div>
<div>The first draft of a spec covering JEP 513 (Flexible Constructor Bodies) is available at:</div>
<div><br>
</div>
<div><a href="https://cr.openjdk.org/~gbierman/jep513/latest/" target="_blank">https://cr.openjdk.org/~gbierman/jep513/latest/</a><br>
</div>
<div><br>
</div>
<div>Feel free to contact me directly or on this list with any comments/corrections.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Gavin</div>
<div><br>
<blockquote>
<div>On 22 Apr 2025, at 13:02, Mark Reinhold <mark.reinhold@oracle.com> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div>https://openjdk.org/jeps/513<br>
<br>
 Summary: In the body of a constructor, allow statements to appear<br>
 before an explicit constructor invocation, i.e., super(...) or<br>
 this(...).  Such statements cannot reference the object under<br>
 construction, but they can initialize its fields and perform other safe<br>
 computations.  This change allows many constructors to be expressed<br>
 more naturally.  It also allows fields to be initialized before they<br>
 become visible to other code in the class, such as methods called from<br>
 a superclass constructor, thereby improving safety.<br>
<br>
- Mark</div>
</div>
</blockquote>
</div>
<br><br></blockquote></div></div></body></html>