Re: Packaging and importing
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Packaging and importing
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2005年8月15日 17:15:59 -0300
> > Please, could you elaborate on that? What change on module()
> > are you proposing?
> Don't have it populate the global namespace. [...]
> This change "fixes" two things:
>
> 1. It prevents using require and then referring to the required entity via
> the global instead of a local.
>
> 2. It discourages relying on some other piece of code doing the require that
> populated the global namespace.
>
> The downside is that it makes command line coding more of a pain. If table
> were a module for example, you would have to write:
I guess you can fix the two problems without the downside by making
"module" do not inherit globals into the new environment.
-- Roberto