lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Szabolcs Szasz wrote:
> Thanks. I already added it myself, that's exactly why
> I got pissed. :) So, ANSI 89 C is the guilty one...
> 
> Now, just a side-note: I added the missing function to
> my LUA API presented to the clients of my platform, but
> hesitated long whether to prefix that function with my
> standard API prefix, or not. Finally I decided not to.
> This is impure, and itching, but how would it look
> in the client code to mg_putenv() something, and then
> just getenv() it back at some other place?
> 
> So, it would be so nice if sometimes platform layers,
> were "bold" enough to even out some of the unevenness
> instead of following "faithfully" the bumps and pits
> of the underlying layers.

Well, in Lua, function names are irrelevant. 
do a mg_putenv = putenv, and your clients will have the 
choice of how to call the function. Oh, and to be 
forwardly compatible with the ideas of Lua 5, I suggest 
that in stead of using a prefix "mg_", you use a table
"mg" and put all your functions in there. then, your end users 
will be able to say mg.putenv(), which is much like 
os.getenv() in Lua 5. 

As for having a Lua that is more "bold", please 
read my other mail. The official Lua should remain small,
but that doesn'nt mena we can't make a "big, bold" 
Lua ourselves. ^_^


-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be