[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: SDL package (namespace problem)
- From: Asko Kauppi <asko.kauppi@...>
- Date: Wed, 6 Aug 2003 20:53:06 +0300
it was nice to get much attention to the naming issue.
in fact, i've already started work on 'sdl_wrap.lua' (part of gluax
2.18) that uses the SDL.* notation. However, it does this by
redirecting the original (C++) module's function, and enhancing some of
them. For compatibility reasons, i keep the 'old stuff' as they are.
In gluax, you can either say USES 'sdl' (for the old interface) or USES
'sdl_new' (for the new one).
Seems like that wrapper should be brought to LuaCheia, too.
p.s. it is quite possible to enforce not using global namespace. i've
done that, with modules that themselves think they're putting stuff to
global. Eventually (for apps) it becomes something_else.*
Peter Loveday kirjoittaa tiistaina, 5. elokuuta 2003, kello 20:17:
My view is that modules should not be allowed to place things in the
namespace. Obviously we can't enfore it, but it can be strongly
I think SDL.LoadBMP() is far more consistant with anything else in
It is a lot more obvoius to a user that a given module has functions
a given table, and has the added bonus that dumping the contents of
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
scripting... For example, we don't use SDL in our app at all, and 99%
scripts will not. If a given script does then thats fine, but that is
per-script thing, and to some degree per-use developing the script for
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
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" <firstname.lastname@example.org>
To: "Lua list" <email@example.com>
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,
- 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
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
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 /