`seq` s and `strings` are 2 pointer sizes so do not experience that 
optimization their value component is passed as copy, but since they own heap 
data that is not copied this can be seen below:
    
    
    proc f(t: seq[string]) =
      echo "f:", cast[int](t[0].addr)
    
    proc fv(t: var seq[string]) =
      echo "fv:", cast[int](t[0].addr)
    
    var t = @["foo", "bar"]
    echo "t:", cast[int](t[0].addr)
    
    f t
    fv t
    
    
    Run

Reply via email to