<div dir="auto">Can you shut the f</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 9 août 2023, 10:10, Thomas Stuefe <<a href="mailto:stuefe@openjdk.org">stuefe@openjdk.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 9 Aug 2023 06:53:49 GMT, David Holmes <<a href="mailto:dholmes@openjdk.org" target="_blank" rel="noreferrer">dholmes@openjdk.org</a>> wrote:<br>
<br>
>> I wrote this code ages ago. I'm not sure what's weird or suspicious about it, though. The comment at the file's beginning explains this code's motivation.<br>
>> <br>
>> The buffer was never thought to be used for something different than HANDLEs or characters, where the assignment of integer literals work. I often use char constants for sentinels as debugging aid. As for `'\0'`, that indicates to the casual code reader that this is a termination of a string, better than had I used a plain 0.<br>
><br>
> Because there is nothing to state what T may be, I found assigning character literals to be odd. If T is char and the buffer is meant to be a C string then it makes more sense. But for non-char T it just raised questions for me.<br>
<br>
I see that. We can remove the sentinel stuff, which leaves us with the zero termination. Arguably, this could be done by sub classes that derive from the char instantiation.<br>
<br>
-------------<br>
<br>
PR Review Comment: <a href="https://git.openjdk.org/jdk/pull/15096#discussion_r1288083649" rel="noreferrer noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/15096#discussion_r1288083649</a><br>
</blockquote></div>