Can someone from the OTP team let me know if I need an EEP for this or if I should just send patches straight to erlang-patches? Thanks in advance.<br><br><div class="gmail_quote">On Mon, Apr 30, 2012 at 7:47 PM, José Valim <span dir="ltr"><<a href="mailto:jose.valim@gmail.com" target="_blank">jose.valim@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At the beginning of this year, there was a discussion about how to implement binary_to_integer/1 in Erlang.<div>There is a possible implementation for such function which is quite trivial:</div>

<div><br></div><div>    list_to_integer(binary_to_list(binary))</div>
<div><br></div><div>However, it has the trade-off that it can't be used in guards (unless defined in a macro) and there is an unnecessary conversion cost to list (although the cost is small since both binary and list are likely small).</div>


<div><br></div><div>With Riak, Cowboy and other tools pushing towards using binaries instead of lists for strings, the need for such functions will become more and more common.</div><div>Is there any chance we will see this as built-in functions and therefore available in guards in R16?</div>


<div><div><br></div><div>Thanks,</div><div><br></div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span style="border-collapse:separate;font-family:arial;font-weight:normal"><div>

<span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>


<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></b></span><br>
</div>
</blockquote></div><br>