[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: changes in 'require'
- From: Mark Hamburg <mhamburg@...>
- Date: Thu, 07 Jul 2005 18:06:24 -0700
I have a third suggestion for a change to require:
Don't load the names into the global namespace by default. Modules can do
this themselves if they insist,but they generally shouldn't need to.
Argument in favor: It avoids code fragility from a missing require being
hidden by other modules happening to do the require.
Argument against: It complicates the command line environment.
I would be inclined to resolve the argument against by providing an easy way
to install an __index metamethod on the command-line globals environment
that automatically does the require and populates the globals.
Mark