On 2013-11-14, at 18:57, Niko Matsakis <[email protected]> wrote: > Basically, a binary operator like `l + r` is translated to something > similar to the following (which assumes universal function notation, > not yet implemented): > > Add::add(&l, &r) > > In other words, no autoderef or other transformation takes place. We > just look for a matching trait. Instead we just pass the values in by > reference. The reason for passing by reference is so that you can > compare linear types more naturally (i.e., `~[1, 2, 3]`).
I'm sorry, I don't understand that last point. Can you explain why it makes those comparisons more natural. -Tommi _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
