You did sorta allude to a solution that works for atleast the C backend. 
Although I'd argue you would want to use an alternative operator or properly 
implement this into a smarter way. 
    
    
    type A = ref object
      x: int
    
    let a = A(x: 1)
    
    let b = a
    
    proc `==`(a, b: A): bool = a.unsafeAddr == b.unsafeAddr
    
    echo a == b
    
    echo a.unsafeAddr.repr
    echo b.unsafeAddr.repr
    
    
    Run

Reply via email to