> We'll probably wind up with a 'swap' > primitive at some point down the line when unique ownership and move > semantics are more thoroughly worked out.
This would be a great use case for syntactic extensions. Seems neater to do something like this in the standard library than in the core. (Context: Common Lisp's rotatef is a generalization of swap implemented simply as a macro. http://www.lispworks.com/documentation/HyperSpec/Body/m_rotate.htm ) _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
