Copying semantics in Nim are fairly straightforward:
    

  * Object types, sequences, and strings copy on assignment
  * References do not copy on assignment



shallowCopy and shallow sidestep the fact that strings and sequences copy on 
assignment. If you use these procedures, any affected variables (which in the 
case of shallowCopy means both arguments) must not be modified.

Udiknedormin: shallow and shallowCopy should not be considered equivalent to 
C++ move operations. If they are used as such, data corruption will result.

Reply via email to