lua-users home
lua-l archive

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


D Burgess wrote:
>Why did you not do?
>
>bc = loadlib(library_path);
>
>i.e. so that loadlib returns the function table rather than 
>internally allocates it. And why not have a designated initialization
>function name?

That was the way it was first done.  Other people have the same feelings as you,
incluing me...:
	http://lua-users.org/lists/lua-l/2002-03/msg00201.html
	http://lua-users.org/lists/lua-l/2002-03/msg00198.html

But Edgar Toernig made good points:
	http://lua-users.org/lists/lua-l/2002-03/msg00197.html
	http://lua-users.org/lists/lua-l/2002-03/msg00199.html

and that's how it's now.

Bottom line: it's more flexible and more consistent with the rest of Lua.
--lhf