-
Notifications
You must be signed in to change notification settings - Fork 7
Description
The current implementation of modifiers for network objects attempts to modify it in place, emulating behaviour of C++, Java, and Python classes, and R6 classes in R. This is accomplished by gabbing the expression for the network from the calling function and then assigning to it at the end if possible. This is quite kludgey, and may produce inconsistent or unpredictable behaviour, say, when a network object is passed to a function and modified there, or when a network is produced by an expression.
This may be possible to avoid using the same approach as R6 classes: whereas R lists are copied on modification, R environments are always references and need to be copied explicitly. Thus, if a network base class is an environment, changes to it will always change it in place automatically.