Well `move` can be a dangerous operation so you should use it when you're 100% 
sure that your code won't use the variable you `move`'d afterwards. This code 
will output an empty string because there was a `move` on `fldX.name` and it's 
now empty: 
    
    
    type
      Vtest = ref object
        name : string
    
    let fldx = new(Vtest)
    fldx.name = "test"
    
    proc setT(val: string): string = val
    
    var x = setT(move(fldX.name))
    
    echo fldX.name
    
    
    Run

You should understand that hints are hints - you shouldn't always blindly 
follow them.

Reply via email to