<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <font size="4"><font face="monospace">If you pull on this string a
        little more, you realize there is very little string left before
        you get to the knot labeled "compiler plugins".  In order to get
        compile-time type checking for arbitrary template processors,
        the template processor class must be available at compile time,
        and the compiler must be willing to invoke it during
        compilation.  While I realize there are lots of folks who think
        that would be a great thing, that's pretty far from the goal of
        this work.  <br>
        <br>
        For processors like FMT, since they are specified in the JDK,
        IDEs can do much of the work here, and it is conceivable `javac`
        can have lint warnings that understand the format specifier.  <br>
        <br>
        For arbitrary processors, annotation processors can add
        additional ad-hoc type checking.<br>
        <br>
      </font></font><br>
    <div class="moz-cite-prefix">On 4/3/2023 6:41 AM, Duncan MacGregor
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:MW5PR08MB821347E04688C2CC0C17B63AE6929@MW5PR08MB8213.namprd08.prod.outlook.com">
      
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">While I agree that compile time
            type checking and constants are a separate topic, string
            templates, and especially the template formatter, seem like
            a reasonable entry point to think about them as they rely on
            a new bit of syntax and are being compiled to something
            special (an invoke dynamic based callsite whose bootstrap
            takes the fragments and the method type). The problem I see
            at the moment is that it’s not clear to me that the type
            information remains available to the processor in a way that
            would make for compile time type checking to be added later,
            and it would be a shame if we cut this path off now. The
            ProcessorLinkage interface feels like it might be closer to
            path allowing this, but I see that it’s sealed at the
            moment.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">It would be sad if we can’t
            leverage a new way of string formatting to introduce compile
            time type checking of those format strings when it feels
            like we’re really close to being on a path that would enable
            it in a natural way.<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Duncan.<o:p></o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>