On 26/12/2011 12:51, zhang wrote:
<snip>
The compiler should do this. A package is a directory, and a module just a file.
When importing a package, the compiler will import all the modules in the 
package.
The user doesn't care about this.

The user may well care if he/she is compiling someone else's project that imports the whole of some huge library despite using only a little bit of it, and this greatly increases the time it takes to compile. Both because of the time it takes to load the modules and because of having a larger symbol table to look through to resolve symbols as and when they are used.

Moreover, there may be modules that are intended primarily for a library's internal use, which would get imported and thereby clutter the symbol table.

Stewart.

Reply via email to