<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 23, 2015 at 3:55 PM, Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 07/23/2015 01:46 AM, Kinkie wrote:<br>
<br>
> the only thing I don't understand is the XXX in<br>
> parsedSize(); it's not clear why the comment,<br>
<br>
</span>The parsedSize() method is broken: It claims to return the number of<br>
bytes parsed, but it does not return that. It usually returns the number<br>
of bytes parsed from the left, but not from the right of the string. For<br>
example,<br>
<br>
skipOne()<br>
skipOneTrailing()<br>
<br>
should usually result in parsedSize() returning 2 because 2 bytes were<br>
parsed and removed from the string. It usually returns 1.<br>
<span class=""><br>
<br>
> and what to use instead.<br>
<br>
</span>There is currently no good alternative. Discussing the best way forward<br>
is outside this project scope (but I welcome such a separate discussion,<br>
of course). Fortunately, no existing code misuses parsedSize() today AFAIK.<br>
<span class=""><br>
<br>
> as soon as that's improved, +1.<br>
<br>
</span>Why?! This is not something the patch breaks. Do you want me to remove<br>
the XXX and just pretend that we have not discovered the problem?<br></blockquote><div><br></div><div>Amos has brought some objections to the proposal, I'll try to clarify what I meant:<br></div><div>because the comment is issuing guidance to callers of that API: as proposed, the guidance is incomplete both for any callers trying to understand what API to use.<br></div><div>If anything, there should be a BUG mark so that implementors may fix it.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hope this clarifies,</blockquote><div><br></div>Same here :)<br><br></div><div class="gmail_quote"> Kinkie<br></div></div></div>