Open axch opened 8 years ago
Note: The Venture console also has a load
command, which is almost the same except that it adds the loaded file to the console's list of loaded files. That modifies the prompt, and causes the file to be reloaded when the user issues the console's reload
command.
No module system for now. Happy to ditch load as an instruction but leave it in the console. ᐧ
On Mon, Jan 4, 2016 at 11:21 AM, axch notifications@github.com wrote:
Note: The Venture console also has a load command, which is almost the same except that it adds the loaded file to the console's list of loaded files. That modifies the prompt, and causes the file to be reloaded when the user issues the console's reload command.
— Reply to this email directly or view it on GitHub https://github.com/probcomp/Venturecxx/issues/309#issuecomment-168722457 .
Right now,
load
is a special toplevel instruction, interpreted only by a special case inRipl.execute_program_from_file
. Can we do better?Issue: Do we want
load
to remain restricted to the top level? If not, what are appropriate semantics for loading inside a nested scope?Issue: Right now
load
will execute all the toplevel statements in the file being loaded, including ones that are not definitions. Do we want to replace this with an actual module system? The latter seems like a lot of work.