4 ms·
If you qualify imports transitive dependencies won’t pollute your scope. It also naturally deals better with name conflicts, allows cherry picking exports etc.
by mirekrusin 3y ago
If you qualify imports transitive dependencies won’t pollute your scope. It also naturally deals better with name conflicts, allows cherry picking exports etc.
- thaumasiotes 3y agoOK, where's the part of this where we're not modifying a global interpreter state?
- tomstuart 3y agoYou’re taking the use of the word “state” too literally. The original comment was complaining about how Ruby `require` adds names (constants) to a global namespace; Python `import` only binds names in the local scope.
- jeltz 3y agoBy that definition I would not say any language has modules. Even compiled ones