[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Namespace pollution in lua.h
- From: "John Belmonte" <jvb@...>
- Date: Fri, 11 May 2001 18:29:27 +0900
David Jones wrote:
> The interface to lua, lua.h, does a very good job of avoiding namespace
> pollution. Most of the identifiers start with lua or LUA which is an
> entirely reasonable part of the namespace to grab. However...
>
> The following code:
>
> --
> #define index 9
> #include "lua.h"
> /* ... */
>
> LUA_API double lua_tonumber (lua_State *L, int index);
It's strange to term this "Lua polluting the namespace". What's polluting
the namespace is the wacky define that's begging for a collision.
If all libraries followed your guidelines, I think we'd never be able to
read program interfaces.
-John