lua-users home
lua-l archive

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


On 11-10-19 10:42 AM, Patrick Mc(avery wrote:
{ snip}
No need to change the language.  Formulate conventions for the
directory structure of the library containing the modules, write a
program (by all means call it `setup.lua`) that generates a module
loader for each subtree, and the difference will be as insignificant
as this:

python:

import library.module as mylib

lua:

mylib = (require "library").module

Dirk


That would be gold! Would there be a performance penalty? Could this also co-exist with the 5.2 mechanisms?

If so why not? It would be so much nicer for non-programmers to work with.


Sorry on second thought, is there a way to do something like this(and please keep in mind I have not touched Python for 3 years)

file foo.py
some foo function

import * foo
now I can call foo

That is, without having the use of functions in tables forced on me?