4 ms·
I think such a mechanism already exists. You can just use the functional import syntax inside of a block. However, I think lazy imports could be ok so long as t
by slaymaker1907 4y ago
I think such a mechanism already exists. You can just use the functional import syntax inside of a block. However, I think lazy imports could be ok so long as the language can show that a particular module is side effect free (i.e. no globals aside from something like constexpr).
- masklinn 4y ago> You can just use the functional import syntax inside of a block. You don't even need functional import syntax, but as TFA notes this comes at a cost as it has to invoke the entire import machinery, which it can only skip to an extent (once a module is loaded and cached) as import hooks can have odd behaviours.