<div dir="ltr"><div class="gmail_default" style="font-family:monospace">I'm sending this message to notify that I'm continuing this thread off of the amber-dev list. If anyone wants to be included/excluded, please reach out individually to me. And please DO NOT CC OR RESPOND TO AMBER DEV.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 24, 2023 at 1:02 PM <<a href="mailto:forax@univ-mlv.fr">forax@univ-mlv.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><br></div><div><br></div><hr id="m_1751166106391622136zwchr"><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Brian Goetz" <<a href="mailto:brian.goetz@oracle.com" target="_blank">brian.goetz@oracle.com</a>><br><b>To: </b>"Remi Forax" <<a href="mailto:forax@univ-mlv.fr" target="_blank">forax@univ-mlv.fr</a>>, "David Alayachew" <<a href="mailto:davidalayachew@gmail.com" target="_blank">davidalayachew@gmail.com</a>><br><b>Cc: </b>"Robbe Pincket" <<a href="mailto:robbepincket@live.be" target="_blank">robbepincket@live.be</a>>, "amber-dev" <<a href="mailto:amber-dev@openjdk.org" target="_blank">amber-dev@openjdk.org</a>><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><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><br>
<blockquote>
<div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<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></div><div><br></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></div><div><br></div><div><br></div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);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></div><div>[...]<br></div><div><br></div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);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></div><div><br></div><div>Rémi<br></div><div><br></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></div><div><br></div></div></div></div></blockquote></div>