[development] need a standard for contrib node build_mode constants

Mike O'Connor mikejoconnor at gmail.com
Thu May 21 19:40:20 UTC 2009


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.

I suspect the same logic would apply here. If we are going to have a usable
api, we should use a string.

Mike O.

With that in mind, you would have to do a lot to convince me that int's were
a better solution for an API.
On Thu, May 21, 2009 at 3:09 PM, Jeff Eaton <jeff at viapositiva.net> wrote:

> On May 21, 2009, at 11:50 AM, Chris Johnson wrote:
>
>  After all, we wouldn't want developers to have actually document
>> anything they write.  ;-)
>>
>
> 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.
>
> There's nothing in *my* documentation that could have solved that, other
> than a pointer to a wiki page where everyone claimed ints.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090521/bbcb88cc/attachment-0001.htm>


More information about the development mailing list