-
Notifications
You must be signed in to change notification settings - Fork 10
Module expressions #464
Copy link
Copy link
Open
Labels
component: compilerConcerning the compilerConcerning the compilercomponent: languageThe Definition of the Plasma LanguageThe Definition of the Plasma Languagemeta: triagedHas the issue been triaged yet?Has the issue been triaged yet?skill: mercurystatus: newA new bug, we may or may not fix it.A new bug, we may or may not fix it.type: enhancement
Milestone
Metadata
Metadata
Assignees
Labels
component: compilerConcerning the compilerConcerning the compilercomponent: languageThe Definition of the Plasma LanguageThe Definition of the Plasma Languagemeta: triagedHas the issue been triaged yet?Has the issue been triaged yet?skill: mercurystatus: newA new bug, we may or may not fix it.A new bug, we may or may not fix it.type: enhancement
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
Tdoesn't actually point to the module, insteadT.newandT.insertpoint 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.