I've been scratching my head a lot for my tensor library between using the 
default seq value semantics or ref/shallowCopy.

For now I'm using the default seq value semantics at least until benchmarks or 
usage shows that it poses a memory/performance issue.

Here are the relevant Nim quotes:

[From Araq:](https://forum.nim-lang.org/t/1793/5) "Parameter passing doesn't 
copy, var x = foo() doesn't copy but moves let x = y doesn't copy but moves, 
var x = y does copy but I can use shallowCopy instead of = for that."

[From Jehan:](https://forum.nim-lang.org/t/1543) "First, it's important to 
understand that most of the time, you won't need shallowCopy at all. Copying is 
shallow by default if (1) the left-hand side of an assignment is a let variable 
or (2) the right-hand side is a function call."

Reply via email to