[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: package system modification (module loaders)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 12 Jan 2005 16:13:27 -0200
> But you made me think about a different idea: require() uses hardcoded
> control flow to go through package.loaded, package.preload, package.cpath
> and package.path. Why not use a single 'path table' that holds closures for
> individual loaders (bound to individual path elements):
The use of individual path elements goes a little too far. The concept
of one single string with all path options is strong and useful (e.g., to
change the path through environment variables). But the idea of a loader
table with all available loaders (pre-loaded, loader_c, and loader_lua)
to be iterated is a good one.
-- Roberto