lua-users home
lua-l archive

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



On Feb 06, 2005, at 22:45, Mike Pall wrote:

Maybe we should adopt the Python convention for naming mixed modules?
C modules get an underscore tacked in front of the module name. The Python module has the regular module name and loads the C module in turn. I think it sends a clear message that you are not supposed to directly load a module
whose name starts with an underscore.

Hmmm... but perhaps I would like to access the native C library directly as well... what about a simple naming convention based on case capitalization instead?

For example, given a mixed package named "LuaSocket", the C library would be named "luasocket" (everything lowercase) and the Lua package, well, "LuaSocket" (mixed case, first letter uppercase).

That way there is no ambiguity while still keeping the module names similar:

require "LuaSocket" vs require( "luasocket" )

At least, this is the convention I'm trying to follow :P

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/