Closed sumny closed 2 years ago
I would say the input arguments should be (1) not modified by reference in the ppl function, and (2) should not have any common references with the output object. However, many operators (gunion
, %>>%
) already clones things, so if all we are doing with graphs
is to gunion
them here this particular case is not a problem I think. If you find other cases in ppl where arguments do get modified by reference then this should probably be fixed...
Should all
Learner
objects etc. inppl
s be deep clones of the input arguments? e.g., https://github.com/mlr-org/mlr3pipelines/blob/e0591244b83b0f1c02dc160b02cf8adad0dacd34/R/mlr_graphs_elements.R#L225