Closed aviralg closed 5 years ago
I made this decision when I started out with the project. I am also thinking about removing it because the 'feature' it introduces is of little to no practical relevance. However, it complicates the code and implementation. Just as a preamble.
When I started the project, my aim aim was to have a 'light-weight' package. Mostly because in the setup I was working in, package updates required more work than to swap a script file. Hence I tried to carry on some features of R packages: lazy load of data. What I ended up with, was lazy load of all objects in the import section. This had two implications: (1) package namespaces (of imports) are not loaded until the import is actually used (2) data was not loaded unless actually used (respecting the lazy load of an R package).
With the same motivation the 'local module namespace layer' you are referring to is constructed lazily. Also here, I do not think that using assign
instead of delayedAssign
has any practical relevance. At this point the 'modules' package is already loaded.
Feel free to continue asking or report back so we can close the issue.
I am trying to understand the implementation of modules.
Its not clear to me why
delayedAssign
is used instead ofassign
for definingdepend
,export
,import
,use
,module
andexpose
functions in ModuleParent