<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>"Brian Goetz" <brian.goetz@oracle.com><br><b>To: </b>"Remi Forax" <forax@univ-mlv.fr>, "David Alayachew" <davidalayachew@gmail.com><br><b>Cc: </b>"Robbe Pincket" <robbepincket@live.be>, "amber-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Monday, July 24, 2023 6:02:16 PM<br><b>Subject: </b>Re: Presentation at JCrete.org<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;"><br>
    <blockquote cite="mid:717967696.2951765.1690213828242.JavaMail.zimbra@univ-eiffel.fr">
      <div style="font-family: arial, helvetica, sans-serif; font-size:
        12pt; color: #000000">
        <div>
          <div><br>
          </div>
          <div>Let's take another example, a builder. I see no problem
            to have a template processor that acts as
            StringBuilder/StringJoiner.<br>
          </div>
          <div><br>
          </div>
          <div>var joiner = new StringJoinerAndTemplateProcessor();<br>
          </div>
          <div>for(...) {<br>
          </div>
          <div>  joiner."""</div>
          <div>   several lines and \{ holes }<br>
          </div>
          <div>   """;<br>
          </div>
          <div>}<br>
          </div>
          <div>return joiner.toString();<br>
          </div>
          <div><br>
          </div>
          <div>I do not see why I can not to that.</div>
        </div>
      </div>
    </blockquote>
    <br>
    I am sorry to hear this.  This is a needlessly-bad design.  <br>
    <br>
    The invocation of ."..." has an effect, but there is no verb
    visible.  What does it do?  (I am not looking for an answer; the
    fact that I have to ask makes this a terrible API design.)  </blockquote><div><br></div><div>I know that you are playing the devil advocate here but given that the variable is called joiner, you may think, occasionnally, that a joiner may join.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Anyway, you convince me one year ago that using an interface instead of a function call was a better idea in term of syntax, but now you are saying that the semantics is not the usual semantics on a method call on an interface. I think i've the right to be confused.<br data-mce-bogus="1"></div><div><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;"><br>
    <br>
    Whereas, when TemplateProcessor behaves more like Function, it is
    clear what it does; takes an X, and gives me a Y.  (It is then on me
    to handle the Y properly.)  </blockquote><div><br></div><div>Some template processors are like a Function, like RAW, but for example, FMT is an instance of a real class, FormatProcessor. <br></div><div><br data-mce-bogus="1"></div><div>[...]<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;"><br>
    <br>
    <br>
    I think it is probably time to end this conversation here, though;
    further arguing about "I wish the design center of this feature were
    different" doesn't seem counterproductive, and it seems you are
    pretty much there.<br></blockquote><div><br></div><div>I do not whish the design center of this feature to be different*. <br></div><div>I'm trying to figure out why you think that having a template processor that do side effects is a bad idea. <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>RĂ©mi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>* I may think that the runtime implementation can be simplified by removing j.l.r.Carriers and friends, and make Processor.Linkage open.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>