How to pass an object by reference and value in Julia?
In Julia, functions always have pass-by-sharing argument-passing behavior: https://docs.julialang.org/en/v1/manual/functions/ This argument-passing convention is also used in most general purpose dynamic programming languages, including various Lisps, Python, Perl and Ruby. A good and useful description can be found here: https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_sharing In short, pass-by-sharing works like pass-by-reference but you cannot change which value a binding in the … Read more