[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: [ANNOUNCE] bare-bones loadlib
- From: Denis Andreev <denq@...>
- Date: Fri, 22 Mar 2002 17:20:44 +0300
ET> Just my 2 cent:
ET> - The API should be like that of loadfile: accept a string and return
ET> a function. loadlib itself should only load the lib, not execute it.
I prefer get table with library contents rather than usless function.
For example:
strlib = loadlibrary("strlib")
m = strlib.format("%02d", 13)
--...
Or
tklua, message = loadlibrary("tklua")
assert(tklua, format("library tklua loading fail with error: %s", message))
label = tklua.tklabel{}
using(tklua)
name = tkentry{}
--...
This may resolve namespace collisions.
--Denq