Right now we use module imports to pass two magic names, bench and unittest, to modules which ask for it. The import is completely safe, using Any guards, and was an explicit allowance in our original module-design discussions. However, the module loaders have to treat these names specially.
We could instead use module parameters. This would make it easier to compile modules so that the loader can choose at runtime whether to run benchmarks or self-tests by choosing how to parameterize the entire compiled collection of modules (the muffin) rather than having to thread names through the imports.
Right now we use module imports to pass two magic names,
bench
andunittest
, to modules which ask for it. The import is completely safe, usingAny
guards, and was an explicit allowance in our original module-design discussions. However, the module loaders have to treat these names specially.We could instead use module parameters. This would make it easier to compile modules so that the loader can choose at runtime whether to run benchmarks or self-tests by choosing how to parameterize the entire compiled collection of modules (the muffin) rather than having to thread names through the imports.