<div dir="ltr"><div style="font-family:monospace" class="gmail_default">Definitely agreed. It was actually brought up before, both here and on reddit. I feel like the example in the JEP contributed more than anything to the confusion.</div><div style="font-family:monospace" class="gmail_default"></div><div dir="ltr"><div class="gmail_default" style="font-family:monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 24, 2023 at 11:19 AM Steve Barham <<a href="mailto:steve@ethx.net">steve@ethx.net</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">> On 24 Jul 2023, at 14:41, Brian Goetz <<a href="mailto:brian.goetz@oracle.com" target="_blank">brian.goetz@oracle.com</a>> wrote:<br>
> <br>
> I think you've laid it out here: you acknowledge that having LOG."stuff" *do* the logging is a bad idea, when there's an entirely sensible alternative that gets you the desired safety and deferral of expensive formatting:<br>
<br>
One observation I’d make here is that the JEP presents an example in the form of a QueryBuilder template processor to produce a PreparedStatement. Per the Javadoc of Connection, this may well result in a side-effect by sending the query to the server for precompilation / validation. <br>
<br>
I think it’s worth having a consistent story to people when presenting the feature - in the JEP example, it would feel a little unwieldy for QueryBuilder to return its own thunky DeferredPreparedStatement, or similar, for the caller to work with. <br>
<br>
Cheers,<br>
<br>
Steve<br>
<br>
<br>
<br>
</blockquote></div></div>