<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></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>"Maurizio Cimadamore" <maurizio.cimadamore@oracle.com><br><b>To: </b>"Remi Forax" <forax@univ-mlv.fr>, "Per-Ake Minborg" <per-ake.minborg@oracle.com><br><b>Cc: </b>"leyden-dev" <leyden-dev@openjdk.org>, "John Rose" <john.r.rose@oracle.com><br><b>Sent: </b>Thursday, July 27, 2023 6:14:48 PM<br><b>Subject: </b>Re: Draft JEP Announcement: "Computed Constants"<br></blockquote></div><div><style style="display:none;">P {margin-top:0;margin-bottom:0;}</style></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;"><p>Hi Remi<br>
      Yes, of course we were aware of that.<br>
      <br>
      Think of this proposal as an API-driven approach (in the style of
      ThreadLocal, ClassValue, ScopedValue, ...) which delivers more or
      less the same feature, but w/o changing the language.</p>
    <p><br>
    </p>
    <p>One thing that's attractive about the API approach is that it is
      not limited to just static fields, but it can also work for
      instance fields as well.</p>
    <p><br>
    </p>
    <p>(that said, I agree the two jeps should somehow be related/link
      to each other)</p></blockquote><div><br></div><div>I see two problems with your suggested approach:<br data-mce-bogus="1"></div><div>- this proposal is on top of lambdas, which means that it can be used for applications but not for the VM startup because it can only be used after method handles sub-system have been initialized.</div><div>- this is not a backward compatible change, if you add a new keyword to static final fields, you can rewrite any public static final fields to a public lazy static final field,</div><div>  by example, String.CASE_INSENSITIVE_ORDER which is rarely used but can not be changed with your proposal.</div><div><br data-mce-bogus="1"></div><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;">
    <p><br>
      Maurizio</p></blockquote><div><br></div><div>Rémi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><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;"><p>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 27/07/2023 17:09, Remi Forax wrote:<br>
    </div>
    <blockquote cite="mid:1265545759.4350538.1690474147671.JavaMail.zimbra@univ-eiffel.fr">
      
      <div style="font-family: arial, helvetica, sans-serif; font-size:
        12pt; color: #000000">
        <div>Hello,<br>
        </div>
        <div>Are you aware of the lazy static final fields proposal ?<br>
        </div>
        <div>  <a href="https://bugs.openjdk.org/browse/JDK-8209964" class="moz-txt-link-freetext" target="_blank">https://bugs.openjdk.org/browse/JDK-8209964</a><br>
        </div>
        <div><br>
        </div>
        <div>In think both proposals should be merged.<br>
        </div>
        <div><br>
        </div>
        <div>Rémi<br>
        </div>
        <div><br>
        </div>
        <hr id="zwchr">
        <div>
          <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>"Per-Ake Minborg" <a class="moz-txt-link-rfc2396E" href="mailto:per-ake.minborg@oracle.com" target="_blank"><per-ake.minborg@oracle.com></a><br>
            <b>To: </b>"leyden-dev" <a class="moz-txt-link-rfc2396E" href="mailto:leyden-dev@openjdk.org" target="_blank"><leyden-dev@openjdk.org></a><br>
            <b>Sent: </b>Thursday, July 27, 2023 5:52:46 PM<br>
            <b>Subject: </b>Draft JEP Announcement: "Computed
            Constants"<br>
          </blockquote>
        </div>
        <div>
          </div>
        <div>
          <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 style="font-family: Calibri, Arial, Helvetica,
              sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
              <span class="x_elementToProof" style="font-size: 12pt;
                margin: 0px; background-color: rgb(255, 255, 255);"><span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">Hi all,</span></span></div>
            <div style="font-family: Calibri, Arial, Helvetica,
              sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
              <div class="x_elementToProof" style="font-size: 12pt;
                margin: 0px; background-color: rgb(255, 255, 255);">
                <br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  Maurizio and
                  I have drafted a JEP for computed constants, which are</span><br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  immutable
                  value holders that are initialized at most once.  They
                  offer</span><br class="x_ContentPasted0
                  ContentPasted0" style="font-size: 14.6667px; color:
                  rgb(36, 36, 36); background-color: rgb(255, 255,
                  255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  the
                  performance and safety benefits of final fields while
                  offering</span><br class="x_ContentPasted0
                  ContentPasted0" style="font-size: 14.6667px; color:
                  rgb(36, 36, 36); background-color: rgb(255, 255,
                  255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  greater
                  flexibility as to the timing of initialization.  In
                  the</span><br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  context of
                  Leyden, they could be one basis for shifting
                  computation</span><br class="x_ContentPasted0
                  ContentPasted0" style="font-size: 14.6667px; color:
                  rgb(36, 36, 36); background-color: rgb(255, 255,
                  255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  both forward
                  and backward in time.</span><br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
              </div>
              <div class="x_elementToProof" style="font-size: 12pt;
                margin: 0px; background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  The draft is
                  here:</span><a href="https://openjdk.org/jeps/8312611" target="_blank" rel="noopener noreferrer" class="x_ContentPasted0 ContentPasted0
                  moz-txt-link-freetext" style="font-size: 14.6667px;
                  margin: 0px; background-color: rgb(255, 255, 255);">https://openjdk.org/jeps/8312611</a><br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
              </div>
              <div class="x_elementToProof" style="font-size: 12pt;
                margin: 0px; background-color: rgb(255, 255, 255);">
                <br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  Now that the
                  Leyden repo is open, I’ll publish the prototype code
                  to a</span><br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  new branch
                  there shortly.</span><br class="x_ContentPasted0
                  ContentPasted0" style="font-size: 14.6667px; color:
                  rgb(36, 36, 36); background-color: rgb(255, 255,
                  255);">
                <br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
              </div>
              <div class="x_elementToProof" style="font-size: 12pt;
                margin: 0px; background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  Comments are
                  welcome!</span><br class="x_ContentPasted0
                  ContentPasted0" style="font-size: 14.6667px; color:
                  rgb(36, 36, 36); background-color: rgb(255, 255,
                  255);">
              </div>
              <div class="x_elementToProof" style="font-size: 12pt;
                margin: 0px; background-color: rgb(255, 255, 255);">
                <br class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">
                <span class="x_ContentPasted0 ContentPasted0" style="font-size: 14.6667px; margin: 0px; display:
                  inline !important; color: rgb(36, 36, 36);
                  background-color: rgb(255, 255, 255);">  Best, Per</span></div>
              <br>
            </div>
            <br>
          </blockquote>
        </div>
      </div>
    </blockquote><br></blockquote></div></div></body></html>