<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 10:01 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 24 October 2013 21:40, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
> Did I miss something? What's wrong with `int`? This is a C API and using an<br>
> int for a "status"/"boolean" is nonproblematic (even expected, I would say;<br>
> all C API's use int's for statuses/booleans).<br>
<br>
</div>Yes, we should have been using int, but we were not and now we are<br>
stuck with bool for ABI stability.<br></blockquote><div><br></div><div>Ah, that makes perfect sense!</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
>This patch seems like needless<br>
> hassle. Furthermore, conditionalizing the actual type seems likely to induce<br>
> future changes to the meaning of this typedef, thus breaking ABI<br>
> compatibility.<br>
><br>
> Actually, bool has the "does true mean success or failure?" problem. With<br>
> `int` you don't have this problem since it is either "status"/"errno"-ish (0<br>
> is success, < 0 is error), like `stat` or a boolean-int (1 is true, 0 is<br>
> false; this is built into the core language's boolean logical operators),<br>
> and which it is is completely obvious from the function name (and of course,<br>
> one can still refer to the function's documentation if need be).<br>
><br>
> -- Sean Silva<br>
><br>
><br>
<br>
</div>Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>