I am trying to design the package and module system for a programming language (Heron) which can be both compiled and interpreted, and from what I have seen I really like the Python approach. Python has a rich choice of modules, which seems to contribute largely to its success.
What I don`t know is what happens in Python if a module is included in two different compiled packages: are there separate copies made of the data or is it shared?
Related to this are a bunch of side-questions:
- Am I right in assuming that packages can be compiled in Python?
- What are there pros and cons to the two approaches (copying or sharing of module data)?
- Are there widely known problems with the Python module system, from the point of view of the Python community? For example is there a PEP under consideration for enhancing modules/packages?
- Are there certain aspects of the Python module/package system which wouldn`t work well for a compiled language?