I think the best example of using strings over ints is DNS. How many people know IP address of their favorite website? Using a numeric based name space is great for machines, but in order for the web to be usable, we had to create DNS.<br>
<br>I suspect the same logic would apply here. If we are going to have a usable api, we should use a string.<br><br>Mike O.<br><br>With that in mind, you would have to do a lot to convince me that int's were a better solution for an API. <br>
<div class="gmail_quote">On Thu, May 21, 2009 at 3:09 PM, Jeff Eaton <span dir="ltr"><<a href="mailto:jeff@viapositiva.net">jeff@viapositiva.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On May 21, 2009, at 11:50 AM, Chris Johnson wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
After all, we wouldn't want developers to have actually document<br>
anything they write. ;-)<br>
</blockquote>
<br></div>
Well... documentation is needed in either case. But with ints, collisions are absolutely inevitable. I ran into this with VotingAPI early on -- I had a const for 'vote_type', and it had 3 values out of the box. Pretty quickly, two other modules both defined fourth value types. suddenly, those modules couldn't co-exist with each other.<br>
<br>
There's nothing in *my* documentation that could have solved that, other than a pointer to a wiki page where everyone claimed ints.<br>
</blockquote></div><br>