Module expressions #464
Labels
component: compiler
Concerning the compiler
component: language
The Definition of the Plasma Language
meta: triaged
Has the issue been triaged yet?
skill: mercury
status: new
A new bug, we may or may not fix it.
type: enhancement
Milestone
In a dynamic language like Python you can selectively import different modules depending on configuration. We could achieve something a little like that by importing both modules but choosing which symbols to use at runtime with indirect calls. Consider.
This example assumes some other syntaxes we don't have yet, and the return value isn't well typed. It's more like pseudo code.
At runtime
T
doesn't actually point to the module, insteadT.new
andT.insert
point to the only two symbols required and the calls are indirect. They may be tupled but to tuple or not-tuple is an optimisation. Both modules need to be present during compilation this is not the same thing as dynamic linking.The text was updated successfully, but these errors were encountered: