My view is that modules should not be allowed to place things in the
global
namespace. Obviously we can't enfore it, but it can be strongly
discouraged.
I think SDL.LoadBMP() is far more consistant with anything else in
LuaCheia.
It is a lot more obvoius to a user that a given module has functions
within
a given table, and has the added bonus that dumping the contents of
that
table gives you a quick list of functions available in the module.
I am not certain that SDL will be a major part of an app that uses it
in
scripting... For example, we don't use SDL in our app at all, and 99%
of
scripts will not. If a given script does then thats fine, but that is
a
per-script thing, and to some degree per-use developing the script for
our
app. I can see the similarity to C code being appealing; but we're not
trying to reproduce C, we're trying to make a more consistant
manageable
scripting system.
So, in summary, I would definitely vote for SDL.LoadBMP() etc :)
Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software
----- Original Message -----
From: "Asko Kauppi" <asko.kauppi@sci.fi>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Tuesday, August 05, 2003 1:11 PM
Subject: SDL package (namespace problem)
I've thought of the SDL namespace problem, and (personally) of the
opinion that it should be in the global namespace. That is,
SDL_LoadBMP() etc.
Reasons:
- that's how C (sample) code is written
- if you code for SDL, it's not just a library (among the others) but
a main part of your app
Opinions are welcome.
John Belmonte kirjoittaa tiistaina, 5. elokuuta 2003, kello 18:09:
This is looking good and builds without any fuss. I wonder if a few
points could be improved:
* support for use of external Lua library. Do you use a stock
Lua
library compile? This will be significant when packaging for Debian,
etc. Also since IUP also contains the Lua source, and you want to
make IUP a module, at least one of you will have to concede...
* rewriting wrapper names (for example, SDL.LoadBMP instead of
SDL.SDL_LoadBMP)
Regards,
-John
Thatcher Ulrich wrote:
luacheia is a full-featured, modular Lua distribution. The project
homepage is at http://luacheia.lua-users.org
--
http:// if l .o /